Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Null safety #86

Merged
merged 15 commits into from
Mar 11, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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