Skip to content

Commit

Permalink
Migrated package to null safety
Browse files Browse the repository at this point in the history
  • Loading branch information
WieFel committed Mar 4, 2021
1 parent 94452b7 commit d2ecce8
Show file tree
Hide file tree
Showing 6 changed files with 97 additions and 90 deletions.
26 changes: 13 additions & 13 deletions lib/app_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class BackdropAppBar extends StatelessWidget implements PreferredSizeWidget {
/// If this is `null` and if [BackdropAppBar.automaticallyImplyLeading] is
/// set to `true`, [BackdropAppBar] sets the underlying [AppBar.leading] to
/// [BackdropToggleButton].
final Widget leading;
final Widget? leading;

/// See [AppBar.automaticallyImplyLeading].
///
Expand All @@ -67,45 +67,45 @@ class BackdropAppBar extends StatelessWidget implements PreferredSizeWidget {
final bool automaticallyImplyLeading;

/// The widget that should be displayed as the [AppBar] title.
final Widget title;
final Widget? title;

/// See [AppBar.actions].
final List<Widget> actions;
final List<Widget>? actions;

/// See [AppBar.flexibleSpace].
final Widget flexibleSpace;
final Widget? flexibleSpace;

/// See [AppBar.bottom].
final PreferredSizeWidget bottom;
final PreferredSizeWidget? bottom;

/// See [AppBar.elevation].
///
/// Defaults to 0.0. This differs from [AppBar.elevation].
final double elevation;

/// See [AppBar.shape]
final ShapeBorder shape;
final ShapeBorder? shape;

/// See [AppBar.backgroundColor].
final Color backgroundColor;
final Color? backgroundColor;

/// See [AppBar.brightness].
final Brightness brightness;
final Brightness? brightness;

/// See [AppBar.iconTheme].
final IconThemeData iconTheme;
final IconThemeData? iconTheme;

/// See [AppBar.actionsIconTheme].
final IconThemeData actionsIconTheme;
final IconThemeData? actionsIconTheme;

/// See [AppBar.textTheme].
final TextTheme textTheme;
final TextTheme? textTheme;

/// See [AppBar.primary].
final bool primary;

/// See [AppBar.centerTitle].
final bool centerTitle;
final bool? centerTitle;

/// See [AppBar.excludeHeaderSemantics].
final bool excludeHeaderSemantics;
Expand All @@ -127,7 +127,7 @@ class BackdropAppBar extends StatelessWidget implements PreferredSizeWidget {
///
/// For more information see [AppBar].
BackdropAppBar({
Key key,
Key? key,
this.leading,
this.automaticallyImplyLeading = true,
this.title,
Expand Down
2 changes: 1 addition & 1 deletion lib/button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class BackdropToggleButton extends StatelessWidget {
icon: AnimatedIcon(
icon: icon,
color: color,
progress: Backdrop.of(context).animationController.view,
progress: Backdrop.of(context).animationController!.view,
),
onPressed: () => Backdrop.of(context).fling(),
);
Expand Down
16 changes: 8 additions & 8 deletions lib/navigation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,33 +43,33 @@ class BackdropNavigationBackLayer extends StatelessWidget {
final List<Widget> items;

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

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

/// Customizable separatorBuilder used with [ListView.separated].
final IndexedWidgetBuilder separatorBuilder;
final IndexedWidgetBuilder? separatorBuilder;

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

/// Sets a custom border on the list items' [InkWell].
/// See [InkResponse.customBorder].
final ShapeBorder itemSplashBorder;
final ShapeBorder? itemSplashBorder;

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

/// Creates an instance of [BackdropNavigationBackLayer] to be used with
/// [BackdropScaffold].
///
/// The argument [items] is required and must not be `null` and not empty.
BackdropNavigationBackLayer({
Key key,
@required this.items,
Key? key,
required this.items,
this.onTap,
this.separator,
this.separatorBuilder,
Expand Down
Loading

0 comments on commit d2ecce8

Please sign in to comment.