Flutter Storyboard

Overview

Buy Me A Coffee Donate github pages GitHub stars flutter_storyboard

storyboard

A Flutter Debug tool to see and test all your screens at once.

Online Demo: https://rodydavis.github.io/storyboard/

screenshot

Examples

Custom Lane Builder

Dynamic Screen Sizes

Material App Example

Widget Example

Multiple Custom Lanes Example

Getting Started

Wrap your MaterialApp with Storyboard.

return StoryBoard.material(
      child: MaterialApp(
        debugShowCheckedModeBanner: false,
        title: 'Flutter Storyboard Example',
        theme: ThemeData.light().copyWith(
          visualDensity: VisualDensity.adaptivePlatformDensity,
        ),
        darkTheme: ThemeData.dark().copyWith(
          visualDensity: VisualDensity.adaptivePlatformDensity,
        ),
        themeMode: ThemeMode.light,
        home: HomeScreen(),
        routes: {
          '/home': (_) => HomeScreen(),
          '/about': (_) => AboutScreen(),
          '/settings': (_) => SettingsScreen(),
        },
      ),
    );

Wrap your WidgetsApp with Storyboard.widgets(). Wrap your CupertinoApp with Storyboard.cupertino().

Custom Routes and Widgets

You can add any number of custom widgets to the canvas, including custom routes. You can add dummy data to the constructors here as it will render all default values.

customScreens: [
  SettingsScreen(),
  AboutScreen(),
  CustomWidget(title: 'Dummy Data'),
],
customRoutes: [
  RouteSettings(name: '/about'),
],

Misc

Now you can test all your screens with a hot reload! You can also disable the widget at any time by setting enabled to false. You will need to do a hot restart after you change this value.

Comments
  • update to work with device_frame v0.3.0

    update to work with device_frame v0.3.0

    Note that this will only work on stable as there are other transistive dependency breakages on beta channel and higher, eg this one in svg.

    @rodydavis if you are interested, I can do further PR that gets things working on beta and earlier channels.

    Fixes: #21

    opened by maks 4
  • Storyboard() use in MaterialApp as widget, does not use size

    Storyboard() use in MaterialApp as widget, does not use size

    When using Storyboard() in a MaterialApp as a widget, like in example "complete_custom_lanes_builder.dart", it does not pick up the size set for the screens in storyboard, they get the size of the host app.

    Tested in version: 0.1.2+1

    opened by rydmike 3
  • Add device frames - [device_preview]

    Add device frames - [device_preview]

    Wild idea for a new feature, add an option to show/select different device frames around the presented screens.

    Maybe code for the device frames could be borrowed from DevicePreview.(https://pub.dev/packages/device_preview)

    enhancement 
    opened by rydmike 3
  • Make StoryBoard and DevicePreview play nice together - [device_preview]

    Make StoryBoard and DevicePreview play nice together - [device_preview]

    If you wrap your Material app in a DevicePreview (https://pub.dev/packages/device_preview) and then in a StoryBoard, the screens presented in the story board do not get the correct media size.

    image

    This happens also if the DevicePreview enabled property is set to false and StoryBoard is set true.

    It would be great if DevicePreview and StoryBoard could play nicely together, at least when they are not enabled at the same time.

    bug enhancement 
    opened by rydmike 3
  • Ehancement: customLanes - Children cannot have a label

    Ehancement: customLanes - Children cannot have a label

    When using StoryBoard() and the customLanes, the children in a CustomLane cannot have a label! Consider possibility to add a custom label text for each child.

    When using StoryBoard.material() and wrapping a material app in it, each screen automatically get a nice label corresponding to the route by default. In customLanes there is no way to add a similar label even manually when defining the custom content of the lanes, by e.g. providing one for selected/all children in a CustomLane. Would be nice if this was possible.

    opened by rydmike 2
  • Issue with: StoryBoard() with empty children: [] and customLanes: [...]

    Issue with: StoryBoard() with empty children: [] and customLanes: [...]

    When using StoryBoard() as a widget in a MaterialApp app with customLanes: [...] you often want children: [] to be empty as they are set via the customLanes: [...]. However, if children is empty, a lane is still drawn for it and it lane heading text "children" is written out, and actually on top of the first customLane.

    Tested in version: 0.1.2+1

    opened by rydmike 2
  • Storyboard() use in MaterialApp as widget, does not pick up theme

    Storyboard() use in MaterialApp as widget, does not pick up theme

    When using Storyboard() in a MaterialApp as a widget, like in example "complete_custom_lanes_builder.dart", it does not pick up the theme of the MaterialApp it is used in.

    Tested in version: 0.1.2+1

    opened by rydmike 2
  • IDEA: Consider a way to present screens in different groups and lanes

    IDEA: Consider a way to present screens in different groups and lanes

    This is just a suggestion for a new feature, but it would be useful to be able to group presented screens into different groups and lanes.

    Basically a way to decided when to start a new row and also to show lane headers, maybe even headers within a lane, if you want to divide stuff on the same row in some cases too. Here is a quick mockup example:

    image

    The group and lane headers could have some default design, optionally a custom template widget could be provided for it.

    Maybe this kind of layout could be done by providing some kind of heading and break "widgets" in desired order the customScreens lists. An option to hide initialRoute/home is then also needed so we do not get it shown first on a row of its own all the time. Naturally there are many ways of doing this, this was just an idea to build upon some already existing features that might be easy to extend to encompass the feature as well.

    enhancement 
    opened by rydmike 2
  • Reset scaling and offset is reset to coded defaults

    Reset scaling and offset is reset to coded defaults

    When you use the reset button to reset the view port settings, it resets to the "hard coded" defaults. It would be nice if it would reset to value(s) that were provided in the widget constructor first, for scaling and offset, and only if such values where not provided in the constructor, would it reset to hard coded defaults.

    image

    bug 
    opened by rydmike 2
  • DarkMode: Consider some border around the screens

    DarkMode: Consider some border around the screens

    In light theme mode the elevation of the screens works well on the presentation canvas:

    image

    However, in dark mode the screens may become a bit too "embedded" with the canvas background:

    image

    Especially in a "true black" mode:

    image

    SOLUTION PROPOSAL 1:

    Add optional separate border styles for the light/dark theme that can be provided/turned on, if so desired.

    SOLUTION PROPOSAL 2:

    Provide color properties where user can specify background colors for the light and and dark theme modes, for the background canvas that presents the screens. This would allow users to specify a background color for the presentation canvas in light and/or dark modes, that are different from the canvas background color used in the theme for the application itself. It then becomes possible to use light/dark background colors that are slightly different from light/dark colors used in the presented application. It of course also allows for totally custom silly background colors of course, which could also be useful in some cases.

    Options 1 and 2 are of course not mutually exclusive, they could both be useful alternatives individually or together.

    bug enhancement 
    opened by rydmike 2
  • Change customAppBar from AppBar to PreferredSizeWidget

    Change customAppBar from AppBar to PreferredSizeWidget

    The customAppBar property:

    /// Override the default app bar of the storyboard
    final AppBar customAppBar;
    

    Should probably be a PreferredSizeWidget like in Scaffold:

    /// An app bar to display at the top of the scaffold.
    final PreferredSizeWidget customAppBar;
    

    So that you can provide a totally custom app bar, instead of just an AppBar(). You can still give it an AppBar() when using PreferredSizeWidget, but also a totally custom version that implements PreferredSizeWidget itself.

    bug enhancement 
    opened by rydmike 2
  • About mobile pages

    About mobile pages

    Sometimes you need to compare two mobile phones (model comparison, interactive comparison, page comparison) to check the effect of the widget, so can you make the page moveable, mobile viewing, convenient for discussion and intuitiveness.

    ___Personally think this storyboard is very powerful.Come on and improve

    enhancement help wanted 
    opened by wisepmlin 1
  • About memory management and experience issues?

    About memory management and experience issues?

    Rendering consumes resources, is there a way to manage resources? This way, the use of page interaction is very stuck and the experience is very poor! ! ! !

    opened by wisepmlin 4
  • Join forces with dashbook?

    Join forces with dashbook?

    Let's make one great flutter dev-tool instead of many!

    Hi! first of all, I want to say that I really appreciate the works in this open-source project, I installed it and all other similar packages, and I think it can be great if the work is unified into a single tool which can become popular and a standard for flutter development.

    I will list all the projects that I found here:

    • https://github.com/erickzanardo/dashbook
    • https://github.com/ookami-kb/storybook_flutter
    • https://github.com/ilikerobots/storyboard

    These 3 have the same goal, a storybookjs inspired package to showcase flutter widgets.

    But there are also these projects that if combined with a flutter storybook, can really become a standard tool for every flutter developer:

    • https://github.com/jamesblasco/flutter_preview (preview any widget in vs code)
    • https://github.com/aloisdeniel/flutter_device_preview (emulate any device size)
    • https://github.com/rodydavis/storyboard (see all routes at once)

    I am pasting this same issue to all of these projects, if you don't want it, feel free to close it :D

    Tell me what you think!

    opened by MuathAmer 0
  • Overflow has been removed in Flutter master

    Overflow has been removed in Flutter master

    See https://github.com/flutter/flutter/pull/61366

    I was not sure if you prefer to add the old Overflow enum to custom_stack.dart or to move everything to using clipBehaviour like in that change so I did not open a PR.

    This results in build errors like this:

    [+2140 ms] [+2138 ms] ../../../.pub-cache/hosted/pub.dartlang.org/flutter_storyboard-0.1.6/lib/src/custom_stack.dart:293:9: Error: Type 'Overflow' not found.
    [        ] [   +1 ms]   final Overflow overflow;
    [        ] [        ]         ^^^^^^^^
    [        ] [        ] ../../../.pub-cache/hosted/pub.dartlang.org/flutter_storyboard-0.1.6/lib/src/custom_stack.dart:344:5: Error: Type 'Overflow' not found.
    [        ] [        ]     Overflow overflow = Overflow.clip,
    [        ] [        ]     ^^^^^^^^
    
    opened by cbenhagen 1
  • Expose properties for the built-in app bar

    Expose properties for the built-in app bar

    To reduce the need to frequently be forced to build an entirely new custom app bar, when using the Storyboard() within a material app as a widget, also consider exposing some of properties for the built in app bar, like:

    Widget title double elevation Color backgroundColor

    To allow for complete custom themeing of the built in appbar also consider exposing:

    IconThemeData iconTheme IconThemeData actionsIconTheme TextTheme textTheme Brightness brightness


    Alternatively, for using a custom app bar, consider showing an example that implements a custom app bar, with re-implementation of the controls on the built in one. I had a quick look at this as an alternative to get it themed the way I wanted that way. While I could get it themed the way I wanted it to look, by making a completely custom one, I could not figure out how to re-implement the controls of the built-in appbar, so that they would actually work in the custom appbar as well. Is this supported? How?

    documentation enhancement 
    opened by rydmike 0
  • Dialogs show up in the StoryBoard

    Dialogs show up in the StoryBoard "host" window

    When an app screen in a story board show a dialog, it shows up in the story boards "host" canvas and is not constrained to the "screen" it originated from. This might or might not be a desirable feature, mostly it is probably not desired if you are presenting a mobile app UI:

    image

    bug 
    opened by rydmike 3
Owner
Rody Davis
Developer Advocate for @material-components at @Google
Rody Davis
🆙🚀 Flutter application upgrade/ Flutter App Upgrade /Flutter App Update/Flutter Update / download Plug-in

???? Flutter application upgrade/ Flutter App Upgrade /Flutter App Update/Flutter Update / download Plug-in (with notice bar progress), supports full upgrade, hot update and incremental upgrade

PengHui Li 344 Dec 30, 2022
ABC of Flutter widgets. Intended for super beginners at Flutter. Play with 35+ examples in DartPad directly and get familiar with various basic widgets in Flutter

Basic Widgets Examples This is aimed for complete beginners in Flutter, to get them acquainted with the various basic widgets in Flutter. Run this pro

Pooja Bhaumik 815 Jan 3, 2023
Minha primeira aplicação android utilizando Flutter feito no curso de Flutter da Cod3r Cursos Online. O foco dessa aplicação foi um contato inicial com o Flutter.

expenses Expenses é uma aplicação android simples feita em Flutter para controlar despesas pessoais. A aplicação consiste em: Listar transações feitas

Guilherme Teixeira Ais 2 Apr 19, 2022
Flutter Github Following Application, Using Flutter Provider and Flutter HTTP to get data from Github API.

Flutter Github Following Application Watch it on Youtube Previous Designs Checkout my Youtube channel Installation Please remember, after cloning this

Mohammad Rahmani 110 Dec 23, 2022
Flutter RSS feed parsing - A demo application of flutter which parse RSS XML contents to the flutter application

Flutter RSS feed parsing demo This is demo application of flutter which shows ho

Nyakuri Levite 3 Nov 15, 2022
Boris Gautier 1 Jan 31, 2022
Code for Flutter Talk from Flutter Vikings 2022: Custom User Interactions in Flutter

Custom User Interactions - Flutter Vikings 2022 A companion app for the Flutter Vikings 2022 talk - Custom User Interactions with Shortcuts, Intents,

Justin McCandless 9 Sep 16, 2022
Create a Flutter User Profile Page UI where you can access and edit your user's information within your Flutter app.

Flutter Tutorial - User Profile Page UI 1/2 Create a Flutter User Profile Page UI where you can access and edit your user's information within your Fl

Johannes Milke 46 Dec 6, 2022
Create a Flutter User Profile Page UI where you can access and edit your user's information within your Flutter app.

Flutter Tutorial - User Profile Page UI #2 Create a Flutter User Profile Page UI where you can access and edit your user's information within your Flu

Johannes Milke 45 Dec 15, 2022
Let's create a selectable Flutter Navigation Drawer with routing that highlights the current item within the Flutter Sidebar Menu.

Flutter Tutorial - Sidebar Menu & Selectable Navigation Drawer Let's create a selectable Flutter Navigation Drawer with routing that highlights the cu

Johannes Milke 12 Dec 26, 2022
Components that optimize Flutter fluency.(Flutter 流畅度优化的通用方案,轻松解决卡顿问题)

Flutter fluency optimization component "Keframe" Page switching fluency improved: How to use Project depend on: Quick learning Constructor Description

Ke Technologies 793 Dec 30, 2022
Challenge yourself every weekend with flutter. Join me to implement challenging UI & digital designs using Flutter.

Weekend With Flutter This is my new challenge. Every weekend, I want to implement challenging UI & digital designs using Flutter. you can join me with

Payam Zahedi 16 Feb 24, 2022
Let's create a complete Flutter User Profile Page with SharedPreferences to persist the user's information in Flutter.

Flutter Tutorial - User Profile & SharedPreferences Let's create a complete Flutter User Profile Page with SharedPreferences to persist the user's inf

Johannes Milke 21 Dec 3, 2022
Let's create a Flutter Collapsible Sidebar Menu that can collapse and expand the Navigation Drawer in Flutter.

Flutter Tutorial - Collapsible Sidebar Menu & Navigation Drawer Let's create a Flutter Collapsible Sidebar Menu that can collapse and expand the Navig

Johannes Milke 22 Jan 3, 2023
🚗 Apple CarPlay for Flutter Apps. Aims to make it safe to use apps made with Flutter in the car by integrating with CarPlay.

CarPlay with Flutter ?? Flutter Apps now on Apple CarPlay! flutter_carplay aims to make it safe to use iPhone apps made with Flutter in the car by int

Oğuzhan Atalay 156 Dec 26, 2022
Flutter ui boilerplate is easiest way to create new flutter project with clean code and well organized file folder.

Flutter UI Boilerplate "Sharing for fun" Flutter ui boilerplate is easiest way to create new flutter project with clean code and well organized file f

Dimas Ibnu Malik 122 Dec 1, 2022
This is a Flutter app which shows how to use the PageView Class in your Flutter App

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

Shehzaan Mansuri 1 Oct 25, 2021
Flutter Architecture Blueprints is a project that introduces MVVM architecture and project structure approaches to developing Flutter apps.

Flutter Architecture Blueprints Flutter Architecture Blueprints is a project that introduces MVVM architecture and project structure approaches to dev

Katsuyuki Mori 2 Apr 9, 2022