Unverified Commit bf8208cd authored by Kate Lovett's avatar Kate Lovett Committed by GitHub

ToDo Audit - Material Library+ (#55789)

parent e1e300bb
...@@ -26,7 +26,7 @@ const Duration kLongPressTimeout = Duration(milliseconds: 500); ...@@ -26,7 +26,7 @@ const Duration kLongPressTimeout = Duration(milliseconds: 500);
/// The maximum time from the start of the first tap to the start of the second /// The maximum time from the start of the first tap to the start of the second
/// tap in a double-tap gesture. /// tap in a double-tap gesture.
// TODO(ianh): In Android, this is actually the time from the first's up event // In Android, this is actually the time from the first's up event
// to the second's down event, according to the ViewConfiguration docs. // to the second's down event, according to the ViewConfiguration docs.
const Duration kDoubleTapTimeout = Duration(milliseconds: 300); const Duration kDoubleTapTimeout = Duration(milliseconds: 300);
......
...@@ -485,7 +485,8 @@ class _ModalBottomSheetRoute<T> extends PopupRoute<T> { ...@@ -485,7 +485,8 @@ class _ModalBottomSheetRoute<T> extends PopupRoute<T> {
} }
} }
// TODO(guidezpl): Look into making this public. A copy of this class is in scaffold.dart, for now. // TODO(guidezpl): Look into making this public. A copy of this class is in
// scaffold.dart, for now, https://github.com/flutter/flutter/issues/51627
/// A curve that progresses linearly until a specified [startingPoint], at which /// A curve that progresses linearly until a specified [startingPoint], at which
/// point [curve] will begin. Unlike [Interval], [curve] will not start at zero, /// point [curve] will begin. Unlike [Interval], [curve] will not start at zero,
/// but will use [startingPoint] as the Y position. /// but will use [startingPoint] as the Y position.
......
...@@ -120,10 +120,6 @@ class ButtonTheme extends InheritedTheme { ...@@ -120,10 +120,6 @@ class ButtonTheme extends InheritedTheme {
}) : assert(data != null), }) : assert(data != null),
super(key: key, child: child); super(key: key, child: child);
// TODO(darrenaustin): remove after this deprecation warning has been on
// stable for a couple of releases.
// See https://github.com/flutter/flutter/issues/37333
//
/// Creates a button theme that is appropriate for button bars, as used in /// Creates a button theme that is appropriate for button bars, as used in
/// dialog footers and in the headers of data tables. /// dialog footers and in the headers of data tables.
/// ///
......
...@@ -289,7 +289,6 @@ class DataCell { ...@@ -289,7 +289,6 @@ class DataCell {
/// ``` /// ```
/// ///
/// {@end-tool} /// {@end-tool}
// TODO(ianh): Also suggest [ScrollingDataTable] once we have it.
/// ///
/// See also: /// See also:
/// ///
...@@ -543,7 +542,8 @@ class DataTable extends StatelessWidget { ...@@ -543,7 +542,8 @@ class DataTable extends StatelessWidget {
alignment: numeric ? Alignment.centerRight : AlignmentDirectional.centerStart, alignment: numeric ? Alignment.centerRight : AlignmentDirectional.centerStart,
child: AnimatedDefaultTextStyle( child: AnimatedDefaultTextStyle(
style: TextStyle( style: TextStyle(
// TODO(ianh): font family should match Theme; see https://github.com/flutter/flutter/issues/3116 // TODO(hansmuller): This should use the information provided by
// textTheme/DataTableTheme, https://github.com/flutter/flutter/issues/56079
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
fontSize: _headingFontSize, fontSize: _headingFontSize,
height: math.min(1.0, headingRowHeight / _headingFontSize), height: math.min(1.0, headingRowHeight / _headingFontSize),
...@@ -596,7 +596,8 @@ class DataTable extends StatelessWidget { ...@@ -596,7 +596,8 @@ class DataTable extends StatelessWidget {
alignment: numeric ? Alignment.centerRight : AlignmentDirectional.centerStart, alignment: numeric ? Alignment.centerRight : AlignmentDirectional.centerStart,
child: DefaultTextStyle( child: DefaultTextStyle(
style: TextStyle( style: TextStyle(
// TODO(ianh): font family should be Roboto; see https://github.com/flutter/flutter/issues/3116 // TODO(hansmuller): This should use the information provided by
// textTheme/DataTableTheme, https://github.com/flutter/flutter/issues/56079
fontSize: 13.0, fontSize: 13.0,
color: isLightTheme color: isLightTheme
? (placeholder ? Colors.black38 : Colors.black87) ? (placeholder ? Colors.black38 : Colors.black87)
......
...@@ -9,7 +9,6 @@ import 'package:flutter/widgets.dart'; ...@@ -9,7 +9,6 @@ import 'package:flutter/widgets.dart';
import 'scaffold.dart'; import 'scaffold.dart';
// TODO(hmuller): should be device dependent.
/// The margin that a [FloatingActionButton] should leave between it and the /// The margin that a [FloatingActionButton] should leave between it and the
/// edge of the screen. /// edge of the screen.
/// ///
......
...@@ -1489,7 +1489,7 @@ class _RenderDecoration extends RenderBox { ...@@ -1489,7 +1489,7 @@ class _RenderDecoration extends RenderBox {
bool hitTestChildren(BoxHitTestResult result, { @required Offset position }) { bool hitTestChildren(BoxHitTestResult result, { @required Offset position }) {
assert(position != null); assert(position != null);
for (final RenderBox child in _children) { for (final RenderBox child in _children) {
// TODO(hansmuller): label must be handled specially since we've transformed it // The label must be handled specially since we've transformed it.
final Offset offset = _boxParentData(child).offset; final Offset offset = _boxParentData(child).offset;
final bool isHit = result.addWithPaintOffset( final bool isHit = result.addWithPaintOffset(
offset: offset, offset: offset,
......
...@@ -345,7 +345,6 @@ class PaginatedDataTableState extends State<PaginatedDataTable> { ...@@ -345,7 +345,6 @@ class PaginatedDataTableState extends State<PaginatedDataTable> {
// around each button on each side, and the button itself will have 8 // around each button on each side, and the button itself will have 8
// pixels internally on each side, yet we want the left edge of the // pixels internally on each side, yet we want the left edge of the
// inside of the button to line up with the 24.0 left inset. // inside of the button to line up with the 24.0 left inset.
// TODO(ianh): Better magic. See https://github.com/flutter/flutter/issues/4460
startPadding = 12.0; startPadding = 12.0;
} }
} else { } else {
...@@ -486,7 +485,8 @@ class PaginatedDataTableState extends State<PaginatedDataTable> { ...@@ -486,7 +485,8 @@ class PaginatedDataTableState extends State<PaginatedDataTable> {
opacity: 0.54 opacity: 0.54
), ),
child: Container( child: Container(
// TODO(bkonyi): this won't handle text zoom correctly, https://github.com/flutter/flutter/issues/48522 // TODO(bkonyi): this won't handle text zoom correctly,
// https://github.com/flutter/flutter/issues/48522
height: 56.0, height: 56.0,
child: SingleChildScrollView( child: SingleChildScrollView(
dragStartBehavior: widget.dragStartBehavior, dragStartBehavior: widget.dragStartBehavior,
......
...@@ -13,8 +13,6 @@ import 'theme.dart'; ...@@ -13,8 +13,6 @@ import 'theme.dart';
const double _kMinCircularProgressIndicatorSize = 36.0; const double _kMinCircularProgressIndicatorSize = 36.0;
const int _kIndeterminateLinearDuration = 1800; const int _kIndeterminateLinearDuration = 1800;
// TODO(hansmuller): implement the support for buffer indicator
/// A base class for material design progress indicators. /// A base class for material design progress indicators.
/// ///
/// This widget cannot be instantiated directly. For a linear progress /// This widget cannot be instantiated directly. For a linear progress
......
...@@ -384,8 +384,6 @@ class _ReorderableListContentState extends State<_ReorderableListContent> with T ...@@ -384,8 +384,6 @@ class _ReorderableListContentState extends State<_ReorderableListContent> with T
if (startIndex != endIndex) if (startIndex != endIndex)
widget.onReorder(startIndex, endIndex); widget.onReorder(startIndex, endIndex);
// Animates leftover space in the drop area closed. // Animates leftover space in the drop area closed.
// TODO(djshuckerow): bring the animation in line with the Material
// specifications.
_ghostController.reverse(from: 0.1); _ghostController.reverse(from: 0.1);
_entranceController.reverse(from: 0.1); _entranceController.reverse(from: 0.1);
_dragging = null; _dragging = null;
......
...@@ -2547,7 +2547,8 @@ class ScaffoldFeatureController<T extends Widget, U> { ...@@ -2547,7 +2547,8 @@ class ScaffoldFeatureController<T extends Widget, U> {
final StateSetter setState; final StateSetter setState;
} }
// TODO(guidezpl): Look into making this public. A copy of this class is in bottom_sheet.dart, for now. // TODO(guidezpl): Look into making this public. A copy of this class is in
// bottom_sheet.dart, for now, https://github.com/flutter/flutter/issues/51627
/// A curve that progresses linearly until a specified [startingPoint], at which /// A curve that progresses linearly until a specified [startingPoint], at which
/// point [curve] will begin. Unlike [Interval], [curve] will not start at zero, /// point [curve] will begin. Unlike [Interval], [curve] will not start at zero,
/// but will use [startingPoint] as the Y position. /// but will use [startingPoint] as the Y position.
......
...@@ -31,7 +31,7 @@ class _TextSpanEditingController extends TextEditingController { ...@@ -31,7 +31,7 @@ class _TextSpanEditingController extends TextEditingController {
@override @override
TextSpan buildTextSpan({TextStyle style ,bool withComposing}) { TextSpan buildTextSpan({TextStyle style ,bool withComposing}) {
// TODO(chunhtai): Implement composing. // This does not care about composing.
return TextSpan( return TextSpan(
style: style, style: style,
children: <TextSpan>[_textSpan], children: <TextSpan>[_textSpan],
...@@ -40,7 +40,8 @@ class _TextSpanEditingController extends TextEditingController { ...@@ -40,7 +40,8 @@ class _TextSpanEditingController extends TextEditingController {
@override @override
set text(String newText) { set text(String newText) {
// TODO(chunhtai): Implement value editing. // This should never be reached.
throw UnimplementedError();
} }
} }
......
...@@ -18,9 +18,9 @@ const double _singleLineVerticalPadding = 14.0; ...@@ -18,9 +18,9 @@ const double _singleLineVerticalPadding = 14.0;
// TODO(ianh): We should check if the given text and actions are going to fit on // TODO(ianh): We should check if the given text and actions are going to fit on
// one line or not, and if they are, use the single-line layout, and if not, use // one line or not, and if they are, use the single-line layout, and if not, use
// the multiline layout. See link above. // the multiline layout, https://github.com/flutter/flutter/issues/32782
// See https://material.io/components/snackbars#specs, 'Longer Action Text' does
// TODO(ianh): Implement the Tablet version of snackbar if we're "on a tablet". // not match spec.
const Duration _snackBarTransitionDuration = Duration(milliseconds: 250); const Duration _snackBarTransitionDuration = Duration(milliseconds: 250);
const Duration _snackBarDisplayDuration = Duration(milliseconds: 4000); const Duration _snackBarDisplayDuration = Duration(milliseconds: 4000);
......
...@@ -70,7 +70,7 @@ class Tab extends StatelessWidget { ...@@ -70,7 +70,7 @@ class Tab extends StatelessWidget {
this.iconMargin = const EdgeInsets.only(bottom: 10.0), this.iconMargin = const EdgeInsets.only(bottom: 10.0),
this.child, this.child,
}) : assert(text != null || child != null || icon != null), }) : assert(text != null || child != null || icon != null),
assert(!(text != null && null != child)), // TODO(goderbauer): https://github.com/dart-lang/sdk/issues/34180 assert(text == null || child == null),
super(key: key); super(key: key);
/// The text to display as the tab's label. /// The text to display as the tab's label.
......
...@@ -253,7 +253,7 @@ class _AnimatedThemeState extends AnimatedWidgetBaseState<AnimatedTheme> { ...@@ -253,7 +253,7 @@ class _AnimatedThemeState extends AnimatedWidgetBaseState<AnimatedTheme> {
@override @override
void forEachTween(TweenVisitor<dynamic> visitor) { void forEachTween(TweenVisitor<dynamic> visitor) {
// TODO(ianh): Use constructor tear-offs when it becomes possible // TODO(ianh): Use constructor tear-offs when it becomes possible, https://github.com/dart-lang/sdk/issues/10659
_data = visitor(_data, widget.data, (dynamic value) => ThemeDataTween(begin: value as ThemeData)) as ThemeDataTween; _data = visitor(_data, widget.data, (dynamic value) => ThemeDataTween(begin: value as ThemeData)) as ThemeDataTween;
assert(_data != null); assert(_data != null);
} }
......
...@@ -307,7 +307,7 @@ class ThemeData with Diagnosticable { ...@@ -307,7 +307,7 @@ class ThemeData with Diagnosticable {
// Spec doesn't specify a dark theme secondaryHeaderColor, this is a guess. // Spec doesn't specify a dark theme secondaryHeaderColor, this is a guess.
secondaryHeaderColor ??= isDark ? Colors.grey[700] : primarySwatch[50]; secondaryHeaderColor ??= isDark ? Colors.grey[700] : primarySwatch[50];
textSelectionColor ??= isDark ? accentColor : primarySwatch[200]; textSelectionColor ??= isDark ? accentColor : primarySwatch[200];
// TODO(sandrasandeep): change to color provided by Material Design team // TODO(hansmuller): We need a TextFieldTheme to handle this instead, https://github.com/flutter/flutter/issues/56082
cursorColor = cursorColor ?? const Color.fromRGBO(66, 133, 244, 1.0); cursorColor = cursorColor ?? const Color.fromRGBO(66, 133, 244, 1.0);
textSelectionHandleColor ??= isDark ? Colors.tealAccent[400] : primarySwatch[300]; textSelectionHandleColor ??= isDark ? Colors.tealAccent[400] : primarySwatch[300];
backgroundColor ??= isDark ? Colors.grey[700] : primarySwatch[200]; backgroundColor ??= isDark ? Colors.grey[700] : primarySwatch[200];
......
...@@ -645,7 +645,7 @@ class StreamBuilder<T> extends StreamBuilderBase<T, AsyncSnapshot<T>> { ...@@ -645,7 +645,7 @@ class StreamBuilder<T> extends StreamBuilderBase<T, AsyncSnapshot<T>> {
/// } /// }
/// ``` /// ```
/// {@end-tool} /// {@end-tool}
// TODO(ianh): remove unreachable code above once https://github.com/dart-lang/linter/issues/1141 is fixed // TODO(ianh): remove unreachable code above once https://github.com/dart-lang/sdk/issues/35520 is fixed
class FutureBuilder<T> extends StatefulWidget { class FutureBuilder<T> extends StatefulWidget {
/// Creates a widget that builds itself based on the latest snapshot of /// Creates a widget that builds itself based on the latest snapshot of
/// interaction with a [Future]. /// interaction with a [Future].
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment