flutter_split_view

Creator: coderz1093

Last updated:

Add to Cart

Description:

flutter split view

flutter_split_view #
A Navigator 2.0 based Flutter widget that automatically splits the screen into two views based on available space.

Usage #
MaterialApp(
title: 'SplitView Demo',
home: SplitView.material(
child: MainPage(),
),
);
copied to clipboard
Cupertino:
CupertinoApp(
title: 'SplitView Demo',
home: SplitView.cupertino(
child: MainPage(),
),
);
copied to clipboard
Navigating #
Push
SplitView.of(context).push(SecondPage());
copied to clipboard
Push with an optional title, which will be used as the back button's title in
Cupertino:
SplitView.of(context).push(
SecondPage(),
title: 'Second',
);
copied to clipboard
Pop
SplitView.of(context).pop();
copied to clipboard
Pop until the n-th page:
SplitView.of(context).popUntil(1);
copied to clipboard
Set the page displayed in the secondary view
SplitView.of(context).setSecondary(SecondPage());
copied to clipboard
This will clear the stack and push the new page, making it the second page in the stack.
Get whether the secondary view is visible #
SplitView.of(context).isSecondaryVisible;
copied to clipboard
Example #

example/lib/main.dart
example/lib/main_cupertino.dart

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files:

Customer Reviews

There are no reviews.