Skip to content

Commit

Permalink
Remove unused name (flutter#165)
Browse files Browse the repository at this point in the history
* Remove unused name property

* remove iml change
  • Loading branch information
maryx authored Jul 29, 2019
1 parent 56d9330 commit 51049af
Show file tree
Hide file tree
Showing 16 changed files with 19 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ class Category extends StatelessWidget {
),
body: ConverterRoute(
color: color,
name: name,
units: units,
),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,17 @@ import 'package:solution_04_navigation/unit.dart';
/// While it is named ConverterRoute, a more apt name would be ConverterScreen,
/// because it is responsible for the UI at the route's destination.
class ConverterRoute extends StatelessWidget {
/// This [Category]'s name.
final String name;

/// Color for this [Category].
final Color color;

/// Units for this [Category].
final List<Unit> units;

/// This [ConverterRoute] requires the name, color, and units to not be null.
/// This [ConverterRoute] requires the color and units to not be null.
const ConverterRoute({
@required this.name,
@required this.color,
@required this.units,
}) : assert(name != null),
assert(color != null),
}) : assert(color != null),
assert(units != null);

@override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ class ConverterRoute extends StatelessWidget {
/// Units for this [Category].
final List<Unit> units;

/// This [ConverterRoute] requires the name, color, and units to not be null.
// TODO: Pass in the [Category]'s name and color
/// This [ConverterRoute] requires the color and units to not be null.
// TODO: Pass in the [Category]'s color
const ConverterRoute({
@required this.units,
}) : assert(units != null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Dart SDK" level="project" />
<orderEntry type="library" name="Dart Packages" level="project" />
</component>
</module>
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ class Category extends StatelessWidget {
),
body: ConverterRoute(
color: color,
name: name,
units: units,
),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,17 @@ import 'package:solution_05_stateful_widgets/unit.dart';
/// While it is named ConverterRoute, a more apt name would be ConverterScreen,
/// because it is responsible for the UI at the route's destination.
class ConverterRoute extends StatefulWidget {
/// This [Category]'s name.
final String name;

/// Color for this [Category].
final Color color;

/// Units for this [Category].
final List<Unit> units;

/// This [ConverterRoute] requires the name, color, and units to not be null.
/// This [ConverterRoute] requires the color and units to not be null.
const ConverterRoute({
@required this.name,
@required this.color,
@required this.units,
}) : assert(name != null),
assert(color != null),
}) : assert(color != null),
assert(units != null);

@override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Dart SDK" level="project" />
<orderEntry type="library" name="Dart Packages" level="project" />
</component>
</module>
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ class Category extends StatelessWidget {
),
body: ConverterRoute(
color: color,
name: name,
units: units,
),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,17 @@ import 'package:task_05_stateful_widgets/unit.dart';
/// because it is responsible for the UI at the route's destination.
// TODO: Make ConverterRoute a StatefulWidget
class ConverterRoute extends StatelessWidget {
/// This [Category]'s name.
final String name;

/// Color for this [Category].
final Color color;

/// Units for this [Category].
final List<Unit> units;

/// This [ConverterRoute] requires the name, color, and units to not be null.
/// This [ConverterRoute] requires the color and units to not be null.
const ConverterRoute({
@required this.name,
@required this.color,
@required this.units,
}) : assert(name != null),
assert(color != null),
}) : assert(color != null),
assert(units != null);

// TODO: Create State object for the ConverterRoute
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Dart SDK" level="project" />
<orderEntry type="library" name="Dart Packages" level="project" />
</component>
</module>
1 change: 0 additions & 1 deletion course/06_input/solution_06_input/lib/category.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ class Category extends StatelessWidget {
),
body: ConverterRoute(
color: color,
name: name,
units: units,
),
// This prevents the attempt to resize the screen when the keyboard
Expand Down
13 changes: 4 additions & 9 deletions course/06_input/solution_06_input/lib/converter_route.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,17 @@ const _padding = EdgeInsets.all(16.0);
/// While it is named ConverterRoute, a more apt name would be ConverterScreen,
/// because it is responsible for the UI at the route's destination.
class ConverterRoute extends StatefulWidget {
/// This [Category]'s name.
final String name;

/// Color for this [Category].
final Color color;

/// Units for this [Category].
final List<Unit> units;

/// This [ConverterRoute] requires the name, color, and units to not be null.
/// This [ConverterRoute] requires the color and units to not be null.
const ConverterRoute({
@required this.name,
@required this.color,
@required this.units,
}) : assert(name != null),
assert(color != null),
}) : assert(color != null),
assert(units != null);

@override
Expand Down Expand Up @@ -164,8 +159,8 @@ class _ConverterRouteState extends State<ConverterRoute> {
child: Theme(
// This sets the color of the [DropdownMenuItem]
data: Theme.of(context).copyWith(
canvasColor: Colors.grey[50],
),
canvasColor: Colors.grey[50],
),
child: DropdownButtonHideUnderline(
child: ButtonTheme(
alignedDropdown: true,
Expand Down
1 change: 1 addition & 0 deletions course/06_input/solution_06_input/solution_06_input.iml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Dart SDK" level="project" />
<orderEntry type="library" name="Dart Packages" level="project" />
</component>
</module>
1 change: 0 additions & 1 deletion course/06_input/task_06_input/lib/category.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ class Category extends StatelessWidget {
),
body: ConverterRoute(
color: color,
name: name,
units: units,
),
// This prevents the attempt to resize the screen when the keyboard
Expand Down
9 changes: 2 additions & 7 deletions course/06_input/task_06_input/lib/converter_route.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,17 @@ const _padding = EdgeInsets.all(16.0);
/// While it is named ConverterRoute, a more apt name would be ConverterScreen,
/// because it is responsible for the UI at the route's destination.
class ConverterRoute extends StatefulWidget {
/// This [Category]'s name.
final String name;

/// Color for this [Category].
final Color color;

/// Units for this [Category].
final List<Unit> units;

/// This [ConverterRoute] requires the name, color, and units to not be null.
/// This [ConverterRoute] requires the color and units to not be null.
const ConverterRoute({
@required this.name,
@required this.color,
@required this.units,
}) : assert(name != null),
assert(color != null),
}) : assert(color != null),
assert(units != null);

@override
Expand Down
1 change: 1 addition & 0 deletions course/06_input/task_06_input/task_06_input.iml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Dart SDK" level="project" />
<orderEntry type="library" name="Dart Packages" level="project" />
</component>
</module>

0 comments on commit 51049af

Please sign in to comment.