Skip to content

Commit

Permalink
- CHANGELOG.md updated
Browse files Browse the repository at this point in the history
- README.md updated
  • Loading branch information
kspo committed Jan 16, 2024
1 parent 49bd883 commit b7e456a
Show file tree
Hide file tree
Showing 7 changed files with 129 additions and 38 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## [2.1.2] - 2024-01-17
* Dart analyze pub.dev score upgraded

## [2.1.1] - 2024-01-17
* Dart analyze pub.dev score upgraded

Expand Down
72 changes: 36 additions & 36 deletions example/lib/samples/playground.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,42 @@ class _PlaygroundState extends State<Playground> {
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
floatingActionButton: FloatingActionButton(
backgroundColor: CupertinoColors.systemBlue,
onPressed: () async {
dynamic value = await showCupertinoModalBottomSheet(
expand: true,
context: context,
enableDrag: false,
builder: (context) => SettingsWidget(
scrollBehavior: scrollBehavior,
animationBehavior: animationBehavior,
unfocusedSliderValue: unfocusedSliderValue,
focusedSliderValue: focusedSliderValue,
alwaysSliderValue: alwaysSliderValue,
largeTitleEnabled: largeTitleEnabled,
searchBarEnabled: searchBarEnabled,
stretch: stretch,
resultBehavior: resultBehavior,
),
);
setState(() {
scrollBehavior = value[0];
animationBehavior = value[1];
unfocusedSliderValue = value[2];
focusedSliderValue = value[3];
alwaysSliderValue = value[4];
largeTitleEnabled = value[5];
searchBarEnabled = value[6];
stretch = value[7];
resultBehavior = value[8];
});
},
child: const Icon(
Icons.settings,
color: Colors.white,
),
),
body: SuperScaffold(
onCollapsed: (val) {
print("collapsed => $val");
Expand Down Expand Up @@ -154,42 +190,6 @@ class _PlaygroundState extends State<Playground> {
),
separatorBuilder: (c, i) => const Divider(),
itemCount: 100),
floatingActionButton: FloatingActionButton(
backgroundColor: CupertinoColors.systemBlue,
onPressed: () async {
dynamic value = await showCupertinoModalBottomSheet(
expand: true,
context: context,
enableDrag: false,
builder: (context) => SettingsWidget(
scrollBehavior: scrollBehavior,
animationBehavior: animationBehavior,
unfocusedSliderValue: unfocusedSliderValue,
focusedSliderValue: focusedSliderValue,
alwaysSliderValue: alwaysSliderValue,
largeTitleEnabled: largeTitleEnabled,
searchBarEnabled: searchBarEnabled,
stretch: stretch,
resultBehavior: resultBehavior,
),
);
setState(() {
scrollBehavior = value[0];
animationBehavior = value[1];
unfocusedSliderValue = value[2];
focusedSliderValue = value[3];
alwaysSliderValue = value[4];
largeTitleEnabled = value[5];
searchBarEnabled = value[6];
stretch = value[7];
resultBehavior = value[8];
});
},
child: const Icon(
Icons.settings,
color: Colors.white,
),
),
),
);
}
Expand Down
68 changes: 68 additions & 0 deletions lib/models/super_appbar.model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,87 @@ class SuperAppBar {
}
}

/// {@template flutter.material.appbar.title}
/// The primary widget displayed in the app bar.
///
/// Becomes the middle component of the [NavigationToolbar] built by this widget.
///
/// Typically a [Text] widget that contains a description of the current
/// contents of the app.
/// {@endtemplate}
///
/// The [title]'s width is constrained to fit within the remaining space
/// between the toolbar's [leading] and [actions] widgets. Its height is
/// _not_ constrained. The [title] is vertically centered and clipped to fit
/// within the toolbar, whose height is [toolbarHeight]. Typically this
/// isn't noticeable because a simple [Text] [title] will fit within the
/// toolbar by default. On the other hand, it is noticeable when a
/// widget with an intrinsic height that is greater than [toolbarHeight]
/// is used as the [title]. For example, when the height of an Image used
/// as the [title] exceeds [toolbarHeight], it will be centered and
/// clipped (top and bottom), which may be undesirable. In cases like this
/// the height of the [title] widget can be constrained. For example:
///
/// ```dart
/// MaterialApp(
/// home: Scaffold(
/// appBar: AppBar(
/// title: SizedBox(
/// height: _myToolbarHeight,
/// child: Image.asset(_logoAsset),
/// ),
/// toolbarHeight: _myToolbarHeight,
/// ),
/// ),
/// )
/// ```
Widget? title;

final Widget? actions;

/// {@template flutter.material.appbar.toolbarHeight}
/// Defines the height of the toolbar component of an [AppBar].
///
/// By default, the value of [toolbarHeight] is [kToolbarHeight].
/// {@endtemplate}
final double height;

/// {@macro flutter.cupertino.CupertinoNavigationBar.leading}
///
/// This widget is visible in both collapsed and expanded states.
final Widget? leading;

final double titleSpacing;

/// {@macro flutter.cupertino.CupertinoNavigationBar.previousPageTitle}
final String previousPageTitle;

/// Controls whether [middle] widget should always be visible (even in
/// expanded state).
///
/// If true (default) and [middle] is not null, [middle] widget is always
/// visible. If false, [middle] widget is visible only in collapsed state if
/// it is provided.
///
/// This should be set to false if you only want to show [largeTitle] in
/// expanded state and [middle] in collapsed state.
final bool alwaysShowTitle;
final double? leadingWidth;
SuperSearchBar? searchBar;
SuperLargeTitle? largeTitle;
SuperAppBarBottom? bottom;
final Color? backgroundColor;

/// {@macro flutter.cupertino.CupertinoNavigationBar.border}
final Border? border;
final Color? shadowColor;

/// {@template flutter.material.appbar.automaticallyImplyLeading}
/// Controls whether we should try to imply the leading widget if null.
///
/// If true and [leading] is null, automatically try to deduce what the leading
/// widget should be. If false and [leading] is null, leading space is given to [title].
/// If leading widget is not null, this parameter has no effect.
/// {@endtemplate}
final bool automaticallyImplyLeading;
}
7 changes: 7 additions & 0 deletions lib/models/super_appbar_bottom.model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@ class SuperAppBarBottom {
});

Widget? child;

/// {@template flutter.material.appbar.toolbarHeight}
/// Defines the height of the toolbar component of an [AppBar].
///
/// By default, the value of [toolbarHeight] is [kToolbarHeight].
/// {@endtemplate}
double height;

final bool enabled;
final Color color;
}
6 changes: 6 additions & 0 deletions lib/models/super_large_title.model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ class SuperLargeTitle {
final String largeTitle;
final List<Widget>? actions;
final TextStyle textStyle;

/// {@template flutter.material.appbar.toolbarHeight}
/// Defines the height of the toolbar component of an [AppBar].
///
/// By default, the value of [toolbarHeight] is [kToolbarHeight].
/// {@endtemplate}
double height;
final EdgeInsets padding;
}
7 changes: 7 additions & 0 deletions lib/models/super_search_bar.model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@ class SuperSearchBar {
final Icon prefixIcon;
final List<SuperAction> actions;
final SearchBarScrollBehavior scrollBehavior;

/// {@template flutter.material.appbar.toolbarHeight}
/// Defines the height of the toolbar component of an [AppBar].
///
/// By default, the value of [toolbarHeight] is [kToolbarHeight].
/// {@endtemplate}
double height;

final EdgeInsets padding;
final SearchBarAnimationBehavior animationBehavior;
final Duration animationDuration;
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: super_cupertino_navigation_bar
description: Elevate your Flutter app's aesthetics with a collapsible app bar, stylish search bar animation, and versatile design inspired by iOS. Customize freely; it seamlessly supports iOS and Android.
version: 2.1.1
description: Elevate your Flutter app's aesthetics with a collapsible app bar, stylish search bar animation, and versatile design inspired by iOS.
version: 2.1.2
homepage: https://github.com/kspo/super_cupertino_navigation_bar.git

environment:
Expand Down

0 comments on commit b7e456a

Please sign in to comment.