Skip to content

Commit d2ecce8

Browse files
committed
Migrated package to null safety
1 parent 94452b7 commit d2ecce8

File tree

6 files changed

+97
-90
lines changed

6 files changed

+97
-90
lines changed

lib/app_bar.dart

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class BackdropAppBar extends StatelessWidget implements PreferredSizeWidget {
5555
/// If this is `null` and if [BackdropAppBar.automaticallyImplyLeading] is
5656
/// set to `true`, [BackdropAppBar] sets the underlying [AppBar.leading] to
5757
/// [BackdropToggleButton].
58-
final Widget leading;
58+
final Widget? leading;
5959

6060
/// See [AppBar.automaticallyImplyLeading].
6161
///
@@ -67,45 +67,45 @@ class BackdropAppBar extends StatelessWidget implements PreferredSizeWidget {
6767
final bool automaticallyImplyLeading;
6868

6969
/// The widget that should be displayed as the [AppBar] title.
70-
final Widget title;
70+
final Widget? title;
7171

7272
/// See [AppBar.actions].
73-
final List<Widget> actions;
73+
final List<Widget>? actions;
7474

7575
/// See [AppBar.flexibleSpace].
76-
final Widget flexibleSpace;
76+
final Widget? flexibleSpace;
7777

7878
/// See [AppBar.bottom].
79-
final PreferredSizeWidget bottom;
79+
final PreferredSizeWidget? bottom;
8080

8181
/// See [AppBar.elevation].
8282
///
8383
/// Defaults to 0.0. This differs from [AppBar.elevation].
8484
final double elevation;
8585

8686
/// See [AppBar.shape]
87-
final ShapeBorder shape;
87+
final ShapeBorder? shape;
8888

8989
/// See [AppBar.backgroundColor].
90-
final Color backgroundColor;
90+
final Color? backgroundColor;
9191

9292
/// See [AppBar.brightness].
93-
final Brightness brightness;
93+
final Brightness? brightness;
9494

9595
/// See [AppBar.iconTheme].
96-
final IconThemeData iconTheme;
96+
final IconThemeData? iconTheme;
9797

9898
/// See [AppBar.actionsIconTheme].
99-
final IconThemeData actionsIconTheme;
99+
final IconThemeData? actionsIconTheme;
100100

101101
/// See [AppBar.textTheme].
102-
final TextTheme textTheme;
102+
final TextTheme? textTheme;
103103

104104
/// See [AppBar.primary].
105105
final bool primary;
106106

107107
/// See [AppBar.centerTitle].
108-
final bool centerTitle;
108+
final bool? centerTitle;
109109

110110
/// See [AppBar.excludeHeaderSemantics].
111111
final bool excludeHeaderSemantics;
@@ -127,7 +127,7 @@ class BackdropAppBar extends StatelessWidget implements PreferredSizeWidget {
127127
///
128128
/// For more information see [AppBar].
129129
BackdropAppBar({
130-
Key key,
130+
Key? key,
131131
this.leading,
132132
this.automaticallyImplyLeading = true,
133133
this.title,

lib/button.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class BackdropToggleButton extends StatelessWidget {
4949
icon: AnimatedIcon(
5050
icon: icon,
5151
color: color,
52-
progress: Backdrop.of(context).animationController.view,
52+
progress: Backdrop.of(context).animationController!.view,
5353
),
5454
onPressed: () => Backdrop.of(context).fling(),
5555
);

lib/navigation.dart

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,33 +43,33 @@ class BackdropNavigationBackLayer extends StatelessWidget {
4343
final List<Widget> items;
4444

4545
/// Callback that is called whenever a list item is tapped by the user.
46-
final ValueChanged<int> onTap;
46+
final ValueChanged<int>? onTap;
4747

4848
/// Customizable separator used with [ListView.separated].
4949
@Deprecated("Replace by use of `separatorBuilder`."
5050
"This feature was deprecated after v0.4.2.")
51-
final Widget separator;
51+
final Widget? separator;
5252

5353
/// Customizable separatorBuilder used with [ListView.separated].
54-
final IndexedWidgetBuilder separatorBuilder;
54+
final IndexedWidgetBuilder? separatorBuilder;
5555

5656
/// Allows to set a [Padding] for each item of the list.
57-
final EdgeInsetsGeometry itemPadding;
57+
final EdgeInsetsGeometry? itemPadding;
5858

5959
/// Sets a custom border on the list items' [InkWell].
6060
/// See [InkResponse.customBorder].
61-
final ShapeBorder itemSplashBorder;
61+
final ShapeBorder? itemSplashBorder;
6262

6363
/// Sets a custom splash color on the list items. See [InkResponse.splashColor].
64-
final Color itemSplashColor;
64+
final Color? itemSplashColor;
6565

6666
/// Creates an instance of [BackdropNavigationBackLayer] to be used with
6767
/// [BackdropScaffold].
6868
///
6969
/// The argument [items] is required and must not be `null` and not empty.
7070
BackdropNavigationBackLayer({
71-
Key key,
72-
@required this.items,
71+
Key? key,
72+
required this.items,
7373
this.onTap,
7474
this.separator,
7575
this.separatorBuilder,

0 commit comments

Comments
 (0)