A very easy-to-use navigation tool/widget for having iOS 13 style stacks.

Overview

cupertino_stackview

Cosmos Software Cosmos Software

Pub License

A very easy-to-use navigation tool/widget for having iOS 13 style stacks.

It is highly recommended to read the documentation and run the example project on a real device to fully understand and inspect the full range of capabilities.

Media | Description | Installation | How-to-Use

Media

Watch on Youtube:

v1.0.0



Description

The "StackView" system, as I like to call it because I don't know the real name, is now the default navigation system for iOS 13. As a fan of this, I decided to implement a very easy-to-use version of it for Flutter as well.

How-to-Use

First, instantiate the cupertinoStackViewController that is provided by "misc.dart" with the required parameters:

cupertinoStackViewController = CupertinoStackViewController(
    navigatorState,
    {
      "Page I": (BuildContext context, dynamic parameters) {
        return PageI();
      },
      "Page II": (BuildContext context, dynamic parameters) {
        return PageII();
      },
      "Page III": (BuildContext context, dynamic parameters) {
        return PageIII();
      },
      "Page IV": (BuildContext context, dynamic parameters) {
        return PageIV();
      },
      ...,
    },
);

Then create a CupertinoStackView widget as shown in the example:

CupertinoStackView(
  true,             //_isPrimary 
  "Page I",         //_navigation
  Scaffold(...),    //_child
  Colors.black,     //_backgroundColor 
 {Key key,
  radius    : Radius.circular(10.0)})

Further Explanations:

For a complete set of descriptions for all parameters and methods, see the documentation.

  • The [cupertinoStackViewController] from 'misc.dart' has to be initialised as soon as the application starts via the [void initialise(double height, double width)] method. Use this method with the [MediaQuery.of(context).size.height] and [MediaQuery.of(context).size.width] values.
  • Use [CupertinoStackViewController]'s [Future back(BuildContext context, dynamic parameters) async] and [Future navigate(String targetNavigation, BuildContext context, dynamic parameters) async] methods for the corresponding actions. Do not call [Navigator] methods directly.

Notes

Any help, suggestion or criticism is appreciated!

Cheers.





Comments
  • Tap on the top of the rear page for getting back leads app to a weird state.

    Tap on the top of the rear page for getting back leads app to a weird state.

    If you swipe the front page down, everything works well, but If you press the top of the rear page for back, it's going to a weird state, and it lost its functionality.

    (I've checked it in your /example app). image

    opened by imaNNeoFighT 14
  • Unable to click Top view on ios device but on android it works well.

    Unable to click Top view on ios device but on android it works well.

    Screen Shot 2022-09-10 at 11 56 25 AM

    Unable to click Top view on ios device but on android it works well. I need to move the clickable button 40px bellow if i want to make it clickable on IOS.

    opened by josephmangmang 0
  • Add missing break statement in case of _currentStatus is null

    Add missing break statement in case of _currentStatus is null

    Problem

    move method from CupertinoStackViewState class uses switch-case statement with _currentStatus. This _currentStatus allows null, but the statement does not consider in case of null. This not only can be a cause of bugs but lowers package score of https://pub.dev/packages/cupertino_stackview/score .

    Change Made

    • Added case null: break statement.

    Review Criterion

    • [ ] If case null: break is valid
    opened by noriHanda 0
  • Turn anonymous fields of CupertinoStackView to named if required

    Turn anonymous fields of CupertinoStackView to named if required

    Problem

    CupertinoStackView widget requires isPrimary, navigation, child, and backgroundColor fields, but these fields are declared anonymously.

    Widgets from material and cupertino packages require fields with names such as child: ,, so those who are new to this flutter-cupertino-stackview package could feel uncomfortable.

    Changes Made

    • Changed names of required fields of CupertinoStackView class from _xxx to xxx so that they can be bounded with a {. (i.e. _isPrimary, _navigation, _child, and _backgroundColor)
    • Bounded all fields with {.
    • Added required declaration on fields started with _'s.
    • Omitted isPrimary getter since _isPrimary field is no longer private.
    • Fixed example/lib/main.dart to correspond with the changes.

    Review Criteria

    • [ ] If omitting isPrimary getter is fine.
    • [ ] If other sub-functionalities work as before.

    Linked Issue

    Fixes #4

    opened by noriHanda 0
  • Required parameters are declared anonymously and confusing

    Required parameters are declared anonymously and confusing

    Problem

    CupertinoStackView widget requires isPrimary, navigation, child, and backgroundColor fields, but these fields are declared anonymously.

    Widgets from material and cupertino packages require fields with names such as child: ,, so those who are new to this flutter-cupertino-stackview package could feel uncomfortable.

    Suggestion

    Turn required fields into named ones.

    opened by noriHanda 0
Owner
AliYigitBireroglu
"It's true that we love one another, I love programming like a little brother."
AliYigitBireroglu
A Very Good Flutter Federated Plugin created by the Very Good Ventures Team 🦄

Very Good Flutter Plugin Developed with ?? by Very Good Ventures ?? A Very Good Flutter Plugin created by the Very Good Ventures Team. Getting Started

Very Good Open Source 14 Oct 19, 2022
A Very Good Dart Package Template created by the Very Good Ventures Team 🦄

Very Good Dart Package Developed with ?? by Very Good Ventures ?? A Very Good Dart package created by Very Good Ventures ?? . Getting Started ?? Insta

Very Good Open Source 8 Aug 14, 2022
A Very Good Flutter Package Template created by the Very Good Ventures Team 🦄

Very Good Flutter Package Developed with ?? by Very Good Ventures ?? A Very Good Flutter package created by Very Good Ventures ?? . Getting Started ??

Very Good Open Source 32 Dec 13, 2022
A Very Good Dart CLI Template created by the Very Good Ventures Team 🦄

Very Good Dart CLI Developed with ?? by Very Good Ventures ?? A Dart CLI template created by the Very Good Ventures Team. Generated by the Very Good C

Very Good Open Source 26 Dec 15, 2022
A Very Flexible Widget that can Implement Material Sheets on all Directions, both modal and persistent, and consequently a Material Navigation Drawer

Flutter_MaterialSheetAndNavigationDrawer If this project helped you reduce developement time or you just want to help me continue making useful tools

Bryan Cancel 30 Dec 4, 2021
A TabBarController that is easy to use for flutter developers. 🥰 It supports various styles of page navigation, and you can also use it to customize your favorite styles. 🍻🍻

easy_tab_controller A user-friendly TabBarController widget for flutter developer. Getting Started This project is a starting point for a Flutter plug

圆号本昊 3 May 26, 2022
Valorant Guide app: a small demo application to demonstrate Flutter application tech-stacks

Valorant Guide Design Design by: Malik Abimanyu App Valorant Guide app is a smal

Ümit Duran 41 Sep 30, 2022
A routing package that lets you navigate through guarded page stacks and URLs using the Router and Navigator's Pages API, aka "Navigator 2.0".

A Flutter package to help you handle your application routing and synchronize it with browser URL. Beamer uses the power of Router and implements all

Sandro Lovnički 485 Jan 7, 2023
null 0 Feb 16, 2022
A simple widget for having UI elements that respond to taps with a spring animation.

spring_button A simple widget for having child widgets that respond to gestures with a spring animation. Media | Description | How-to-Use Media Watch

AliYigitBireroglu 73 Oct 26, 2022
Neumorphic style - Example app with Flutter that displays a neumorphic style container

Flutter Neumorphic Style Example App Example app with Flutter that displays a ne

Piyush Nagpal 2 Mar 24, 2022
A flutter widget to indicate loading progress. Easy to use, easy to extend

?? ?? ?? A flutter widget to indicate loading progress. Easy to use, easy to extend

Manuel Duarte 2 May 30, 2022
With cupertino_setting_control you can create a settings page or a simple form very easy.

Flutter Cupertino Setting Control With cupertino_setting_control you can create a settings page or a simple form very easy. Therefore, cupertino_setti

Christoph Rothermel 7 Mar 28, 2022
This is tool to create 3D Models which can be used in Flutter Applications. Tool is developed completely using Flutter.

three_d_model_tool A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you start

Shubham Yeole 2 Nov 8, 2022
"FlutterMoneyFormatter" is a Flutter extension to formatting various types of currencies according to the characteristics you like, without having to be tied to any localization.

FlutterMoneyFormatter FlutterMoneyFormatter is a Flutter extension to formatting various types of currencies according to the characteristics you like

Fadhly Permata 81 Jan 1, 2023
An Android Launcher (having Ubuntu-Gnome flavour) build with Flutter

Ubuntu Launcher Introduction Ubuntu launcher is an custom android launcher build with Flutter with a Ubuntu-Gnome look. Though flutter is a cross plat

5hifaT 252 Dec 22, 2022
SSH no ports provides ssh to a remote Linux device with out that device having any ports open

Ssh! No ports ssh no ports provides a way to ssh to a remote linux host/device without that device having any open ports (not even 22) on external int

The Atsign Foundation 224 Dec 21, 2022