Git Product home page Git Product logo

aagarwal1012 / introviews-flutter Goto Github PK

View Code? Open in Web Editor NEW
661.0 23.0 141.0 9.08 MB

☀️ A Flutter package for some material design app intro screens with some cool animations.

Home Page: https://introviews-flutter.web.app

License: MIT License

Java 0.12% Objective-C 0.69% Dart 48.97% Kotlin 0.11% Swift 1.03% HTML 1.38% CMake 21.98% C++ 24.21% C 1.52%
flutter dart flutter-package intro-views material-ui material-design page-reveal intro-screen welcome-page onboarding

introviews-flutter's Introduction



IntroViews is inspired by Paper Onboarding and developed with love from scratch. Checkout our fully responsive live example app.

Table of contents

Features

  • Easy addition of pages.

  • Circular page reveal.

  • Cool Animations.

  • Animation control, if the user stops sliding in the midway.

  • Skip button, for skipping the app intro.

  • Custom font selection.

  • Material Design.

Getting Started

You should ensure that you add the intro_views_flutter as a dependency in your flutter project.

dependencies:
  intro_views_flutter: '^3.2.0'

You can also reference the git repository directly if you want:

dependencies:
  intro_views_flutter:
    git: git://github.com/aagarwal1012/IntroViews-Flutter

You should then run flutter packages get in your terminal so as to get the package.

Usage

  • IntroViewsFlutter widget require a list of PageViewModel , and some other parameters. Refer the code below to create a PageViewModel page.

    import 'package:intro_views_flutter/intro_views_flutter.dart';
    
    ...
    
    final page = PageViewModel(
        pageColor: const Color(0xFF607D8B),
          iconImageAssetPath: 'assets/taxi-driver.png',
          body: Text(
            'Easy  cab  booking  at  your  doorstep  with  cashless  payment  system',
          ),
          title: Text('Cabs'),
          mainImage: Image.asset(
            'assets/taxi.png',
            height: 285.0,
            width: 285.0,
            alignment: Alignment.center,
          ),
          titleTextStyle: TextStyle(fontFamily: 'MyFont', color: Colors.white),
          bodyTextStyle: TextStyle(fontFamily: 'MyFont', color: Colors.white),
        );
  • Now refer the code below to get the IntroViewsFlutter widget.

    final Widget introViews = IntroViewsFlutter(
          page,
          onTapDoneButton: () {
            // Void Callback
          },
          showSkipButton: true,
          pageButtonTextStyles: TextStyle(
              color: Colors.white,
              fontSize: 18.0,
              fontFamily: 'Regular',
            ),
        );

    For further usage refer the example available.

    For Landscape preview click the link.

    Note : If you added more than four pages in the list then there might be overlapping between page icons and skip button, so my suggestion is just make the showSkipButton: false.

Documentation

PageViewModel Class

Dart attribute Datatype Description Default Value
pageColor Color? Set color of the page. Null
pageBackground Widget Set a widget as a background of the whole page (pageColor has priority) Null
mainImage Image / Widget Set the main image of the page. If null, then the widget is omitted. -
title Text / Widget Set the title text of the page. If null, then the widget is omitted. -
body Text / Widget Set the body text of the page. If null, then the widget is omitted. -
iconImageAssetPath String? Set the icon image asset path that would be displayed in page bubble. Null
iconColor Color? Set the page bubble icon color. Null
bubbleBackgroundColor Color Set the page bubble background color. Colors.white / Color(0x88FFFFFF)
textStyle TextStyle? Set TextStyle for both title and body title: color: Colors.white , fontSize: 50.0
body: color: Colors.white , fontSize: 24.0
titleTextStyle TextStyle Set TextStyle for title color: Colors.white , fontSize: 50.0
bodyTextStyle TextStyle Set TextStyle for body color: Colors.white , fontSize: 24.0
bubble Widget? Set a custom widget for the inner bubble Null

IntroViewFlutter Class

Dart attribute Datatype Description Default Value
pages List<PageViewModel> Set the pages of the intro screen. (required)
onTapDoneButton VoidCallback? Method executes on tapping done button. Null
onTapBackButton VoidCallback? Method executes on tapping back button. Null
onTapNextButton VoidCallback? Method executes on tapping next button. Null
showSkipButton bool Show the skip button at the bottom of page. true
showBackButton bool Show the Back button at the bottom of page. Overrides showSkipButton starting from the second page false
showNextButton bool Show the Next button at the bottom of page. Overrides doneButtonPersist. false
pageButtonTextSize double Set the button text size. 18.0
pageButtonFontFamily String? Set the font of button text. Null
onTapSkipButton VoidCallback? Method executes on tapping skip button. Null
pageButtonTextStyles TextStyle? Configure TextStyle for skip, done buttons, overrides pageButtonFontFamily, pageButtonsColor, pageButtonTextSize. fontSize: 18.0, color: Colors.white
skipText Text / Widget Override Skip Button Text and styles. Text('SKIP')
doneText Text / Widget Override Done Button Text and styles. Text('DONE')
backText Text / Widget Override Back Button Text and styles. Text('BACK')
nextText Text / Widget Override Next Button Text and styles. Text('NEXT')
doneButtonPersist bool Show done Button throughout pages false
columnMainAxisAlignment MainAxisAlignment Control [MainAxisAlignment] for column MainAxisAlignment.spaceAround
fullTransition double Adjust scroll distance for full transition 300.0
background Color? Set the background color to Colors.transparent if you have your own background image below Null

For help on editing package code, view the flutter documentation.

Bugs or Requests

If you encounter any problems feel free to open an issue. If you feel the library is missing a feature, please raise a ticket on GitHub and I'll look into it. Pull request are also welcome.

See Contributing.md.

Donate

If you found this project helpful or you learned something from the source code and want to thank me, consider buying me a cup of ☕

Contributors

Thanks goes to these wonderful people (emoji key):


Tal Jacobson

🚧 📖 📆

marloncepeda

🐛

Kravchenko Igor

🐛

SiDevesh

🤔

Slawa Pidgorny

🤔

Haider Al-Tahan

🤔

Newerton

🐛

Kenneth Gulbrandsøy

🐛 ⚠️

Sahil Kumar

⚠️

Rodrigo Boratto

🐛

RKKgithub

💻

Sudipta Dutta

🐛

Matěj Žídek

🐛 💻 📦 🚧 🤔 📖

ride4sun

💻

zognotadog

💻

Jayson

🐛

This project follows the all-contributors specification. Contributions of any kind welcome! See Contributing.md.

License

IntroViews-Flutter is licensed under MIT license.

introviews-flutter's People

Contributors

aagarwal1012 avatar allcontributors[bot] avatar gorniv avatar haideraltahan avatar imgbot[bot] avatar ir2pid avatar jayson1999 avatar kengu avatar marloncepeda avatar mzdm avatar newerton avatar ride4sun avatar rkkgithub avatar rwrz avatar sidevesh avatar spidgorny avatar taljacobson avatar xsahil03x avatar zognotadog avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

introviews-flutter's Issues

support RTL

Is your feature request related to a problem? Please describe.
in an arabic app i cant swipe in the desired direction

Describe the solution you'd like
the right swipe in an arabic app goes left and vise versa
i

Describe alternatives you've considered
i would like to add RTL support for swiping in views

Maintainer Required

Due to multiple engagements and commitments, I am unable to devote time to solving issues and maintaining the package. Therefore, I strongly require someone who can spend his time to maintaining this repository.
Anyone interested can comment below and please start working on the current issues! In case of any difficultly, I am ready for a quick call to solve ambiguities.

Page' is imported from both navigator and page

been getting this error
Compiler message:

../../../.pub-cache/hosted/pub.dartlang.org/intro_views_flutter-2.8.0/lib/intro_views_flutter.dart:241:11: Error: 'Page' is imported from both 'package:flutter/src/widgets/navigator.dart' and 'package:intro_views_flutter/UI/page.dart'.
Page(
^^^^

I get this error when i try to use this on my app

../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/intro_views_flutter-2.8.2/lib/intro_views_flutter.dart:237:7: Error: No named parameter with the name 'resizeToAvoidBottomPadding'.
resizeToAvoidBottomPadding: false,
^^^^^^^^^^^^^^^^^^^^^^^^^^
../../../Developer/flutter/packages/flutter/lib/src/material/scaffold.dart:1451:9: Context: Found this candidate, but the arguments don't match.

const Scaffold({
^^^^^^^^

bubble

hello sir,
You have done a great job by making this but I have one suggestion to give you that add new property of asking number of bubble shows at once because as we have more number of intro screen , bubble got on the next and back button and you can keep default value as 3. it looks good to show 3 bubble at once inspite of having any number of intro screen. and the size of bubble increased so many as come on that page. it should be somewhat small .Remaining everything is all good.

thank you.

Title Getting Covered

It looks like title text is getting cut from the top. I made the title on the first page font 15, and its shows. So it looks like there is something blocking the title.

Title w/ Font 15

simulator screen shot - iphone xs - 2019-02-25 at 12 36 58

Regular Title

simulator screen shot - iphone xs - 2019-02-25 at 12 37 01

final pages = [
    new PageViewModel(
        pageColor: mainColor,
        iconImageAssetPath: 'images/events.png',
        body: Text(
          'View conference schedules to keep on top of all your DECA events',
        ),
        title: Text(
          'Events',
          style: TextStyle(fontSize: 15.0),
        ),
        textStyle: TextStyle(fontFamily: 'Product Sans', color: Colors.white),
        mainImage: Image.asset(
          'images/events.png',
          height: 285.0,
          width: 285.0,
          alignment: Alignment.center,
        )
    ),
    new PageViewModel(
      pageColor: mainColor,
      iconImageAssetPath: 'images/alert.png',
      body: Text(
        'Be notified of imporant updates, including when your next event is about to start',
      ),
      title: Text('Alerts'),
      mainImage: Image.asset(
        'images/alert.png',
        height: 285.0,
        width: 285.0,
        alignment: Alignment.center,
      ),
      textStyle: TextStyle(fontFamily: 'Product Sans', color: Colors.white),
    ),
    new PageViewModel(
      pageColor: mainColor,
      iconImageAssetPath: 'images/map.png',
      body: Text(
        'Find event locations quickly with our built-in maps',
      ),
      title: Text('Maps'),
      mainImage: Image.asset(
        'images/map.png',
        height: 285.0,
        width: 285.0,
        alignment: Alignment.center,
      ),
      textStyle: TextStyle(fontFamily: 'Product Sans', color: Colors.white),
    ),
    new PageViewModel(
      pageColor: mainColor,
      iconImageAssetPath: 'images/platform.png',
      body: Text(
        'Easy access from all your favorite devices',
      ),
      title: Text(
        'Multi-Platform',
        textAlign: TextAlign.center,
      ),
      mainImage: Image.asset(
        'images/platform.png',
        height: 285.0,
        width: 285.0,
        alignment: Alignment.center,
      ),
      textStyle: TextStyle(fontFamily: 'Product Sans', color: Colors.white),
    ),
    new PageViewModel(
      pageColor: mainColor,
      iconImageAssetPath: 'images/logo_white_trans.png',
      body: Text(
        'Click done to get started!',
      ),
      title: Text('Welcome to', textAlign: TextAlign.center,),
      mainImage: Image.asset(
        'images/logo_white_trans.png',
        height: 285.0,
        width: 285.0,
        alignment: Alignment.center,
      ),
      textStyle: TextStyle(fontFamily: 'Product Sans', color: Colors.white),
    )
  ];

@override
  Widget build(BuildContext context) {
    return new Container(
      color: mainColor,
      child: new SafeArea(
        child: new IntroViewsFlutter(
          pages,
          onTapDoneButton: () {
            router.navigateTo(context,'/toRegister', transition: TransitionType.fadeIn, clearStack: true);
          },
          columnMainAxisAlignment: MainAxisAlignment.start,
          showSkipButton: false, //Whether you want to show the skip button or not.
          pageButtonTextStyles: TextStyle(
            color: Colors.white,
            fontSize: 18.0,
          ),
        ),
      ),
    );
  }

Customaisation in indicator size

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

No named parameter with the name 'resizeToAvoidBottomPadding'.

Describe the bug
App wouldn't run after upgrading to Flutter version 1.26.0-2.0.pre.451 at C:\src\flutter

To Reproduce
Steps to reproduce the behavior:

  1. download Flutter version 1.26
  2. See error:
/C:/Users/Zal/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/intro_views_flutter-2.8.2/lib/intro_views_flutter.dart:237:7: Error: No named parameter with the name 'resizeToAvoidBottomPadding'.
      resizeToAvoidBottomPadding: false,
      ^^^^^^^^^^^^^^^^^^^^^^^^^^
/C:/src/flutter/packages/flutter/lib/src/material/scaffold.dart:1437:9: Context: Found this candidate, but the arguments don't match.
  const Scaffold({
        ^^^^^^^^

Expected behavior
IntroViewsFlutter should render properly

Flutter Doctor

C:\src\flutter\bin\flutter.bat doctor --verbose
[√] Flutter (Channel master, 1.26.0-2.0.pre.451, on Microsoft Windows [Version 10.0.19041.746])
    • Flutter version 1.26.0-2.0.pre.451 at C:\src\flutter
    • Framework revision 5b0f69f961 (4 hours ago), 2021-01-21 07:49:03 -0500
    • Engine revision 30bb7452f8
    • Dart version 2.12.0 (build 2.12.0-247.0.dev)

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at C:\Users\AppData\Local\Android\sdk
    • Platform android-30, build-tools 29.0.2
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Android Studio (version 4.1.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)


• No issues found!
Process finished with exit code 0

Smartphone (please complete the following information):
Pixel 4 API 26

Active bubble is slightly off-center

@Jayson1999 Please try it now if it works.

Yes, it's working fine with the bubble layout already. However on vertical view, the bubble layouts are still not entirely centered while translating. On horizontal's case, it's perfectly centered.

you mean it's not vertically centered with the Text Buttons, or ?

Active bubble on the screen, the red lines below show the center point.

Originally posted by @Jayson1999 in #96 (comment)

pageColor should be called pageBackground and accept a widget

pageColor might be nice to have but it is not very flexible instead or as addition, pageBackground should be present and accept a widget. That allows complete customization like bubbles floating in the background or just plain colors or gradients etc. etc.

Add animation for click button skip, next, back

First! Thank for your package. It saves me a lot of time.
Hope I can help you with this "Request"

--> This is my code

...
void animationToPage(int page) {
    nextPageIndex = page;
    animatedPageDragger = AnimatedPageDragger(
      slideDirection: activePageIndex > nextPageIndex
          ? SlideDirection.leftToRight
          : SlideDirection.rightToLeft,
      transitionGoal: TransitionGoal.open,
      slidePercent: slidePercent,
      slideUpdateStream: slideUpdateStream,
      vsync: this,
    );
    animatedPageDragger.run();
  }
...

  void onPressedBack() {
    animationToPage(max(0, activePageIndex - 1));
  }

  void onPressedNext() {
    animationToPage(min(widget.pages.length - 1, activePageIndex + 1));
  }

  void onPressedSkip() {
    animationToPage(widget.pages.length - 1);
  }
...

giving mainImage a Column widget containing a text and image, the text does not display on first launch

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. set mainImage of PageViewModel to a Column containing a text and image
  2. close app
  3. open app
  4. See error, text not showing

Expected behavior
Text must show

Smartphone (please complete the following information):

  • Device: [e.g. xiaomi redmi note 7]
  • OS: [android 9]

also tested on pixel xl emulator with android 28, issue persists

Additional context
Want to do this because the title seems to be too far and too close to the top, I want to center it a little

Title Text is Hidden

Describe the bug
The title text of the page is sometimes hidden.

To Reproduce
Steps to reproduce the behavior:

  1. Get an SVG from Undraw.co
  2. Display the SVG like so...
class Intro extends StatelessWidget {
  final pageList = [
    PageViewModel(
      pageColor: const Color(0xFF607D8B),
      iconImageAssetPath: 'assets/baseline_alarm_black_24dp.png',
      //iconColor: null,
      //bubbleBackgroundColor: null,
      body: Text(
        'Testing',
      ),
      title: Text('Scheduling'),
      mainImage: SvgPicture.asset(
        'assets/timemng.svg',
        height: 285.0,
        width: 285.0,
        alignment: Alignment.center,
      ),
    ),
  ];

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: IntroViewsFlutter(
      pageList,
      onTapDoneButton: (){
        //Void Callback
      },
      showSkipButton: true,
      pageButtonTextStyles: new TextStyle(
          color: Colors.white,
          fontSize: 18.0,
          fontFamily: "Regular",
        ),
    ),
    );
  }
}
  1. The text overlaps.

Expected behavior
The text should be "on top of" the SVG.

Screenshots
Screen Shot 2019-03-21 at 11 39 02 AM

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6] iPhone XR (Emulator)
  • OS: [e.g. iOS8.1] 12.1

Additional context
N/A

If you add 6..7 image then done button overlap and ui break

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Customization needed in body and indicators

I want to have the ability to change the view of the circles below (page indicators) and I want to do custom content, Because I want to Implement this on,

screenshot

So Can I do that?

pageButtonTextStyles property does not work

Bug Description
When i try to change the color of the buttons from white to any other color, either by setting the pageButtonTextStyles property or by setting the skip- done- back- or nextText property to a Text Widget with wanted characteristics, they stay white. I'm using intro_views_flutter Version 2.6.0

To Reproduce

  1. Set the pageColor property to Colors.white
  2. Change the button color to any other than white, using one of the properties above
  3. Buttons are still not visible

Smartphone:

  • Tested on a Samsung Galaxy S7

Flutter doctor output
`[✓] Flutter (Channel master, v1.6.2, on Mac OS X 10.13.4 17E199, locale de-DE)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✗] iOS toolchain - develop for iOS devices
✗ Xcode installation is incomplete; a full installation is necessary for iOS development.
Download at: https://developer.apple.com/xcode/download/
Or install Xcode via the App Store.
Once installed, run:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
✗ libimobiledevice and ideviceinstaller are not installed. To install with Brew, run:
brew update
brew install --HEAD usbmuxd
brew link usbmuxd
brew install --HEAD libimobiledevice
brew install ideviceinstaller
✗ ios-deploy not installed. To install:
brew install ios-deploy
✗ CocoaPods not installed.
CocoaPods is used to retrieve the iOS platform side's plugin code that responds to your plugin usage on the
Dart side.
Without resolving iOS dependencies with CocoaPods, plugins will not work on iOS.
For more info, see https://flutter.dev/platform-plugins
To install:
brew install cocoapods
pod setup
[✓] Android Studio (version 3.1)
[!] IntelliJ IDEA Ultimate Edition (version 2018.3.5)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] Connected device (1 available)
`

Next Button

Feature:
Adding a next button for the user to move to the next screen rather than only having swipe.

I have already implemented the feature. However, I cannot create a new branch to pull the code (I am not a contributor).

Screenshot:
screen shot 2018-12-23 at 3 15 49 pm

Doesn't fit screen in landscape mode.

When orientation is switched to landscape mode the flutter overflow black and yellow bar is shown.

To Reproduce
Steps to reproduce the behavior:

  1. Change device orientation to landscape while viewing Intro-Views

Expected behavior

It would be preferable if the layout changed to fit title, image and controls.

Enable body to take full height.

The problem I'm facing is when I provide a lengthy description or provide a more fleshed out body widget, the lack of space becomes an issue.

Ideally, I would like to adjust the ratio of the picture to body content, however, another easier approach is to let the body take full height and managing the picture myself in the body section.

I have tried downloading the library myself and making the required changes to generate a module, however, I seem to keep running into build issues which seems to hint at outdated libraries or code in the project?

A possible simple update would be to alter the 'PageViewModel' to include a bool property that will enable a full-height body.
Then updating the '_buildPortraitPage' in the 'Page' model with a simple if wrapping the image item's 'Expanded' widget and using the 'PageViewModel's' new bool property as the evaluation in the if. The same can be used for the '__buildLandscapePage' method.
Unfortunately, I could not test this as not even run would work.

Implement a way to customize the button text

Is your feature request related to a problem? Please describe.
I currently working on a project and i need to make the "next" and "skip" text in German.

Describe the solution you'd like
So it would be nice if you can implement a way to change the text

Additional context
I gonna look also if i can implement a solution by myself and gonna make a pull request.

Body text aligns to bottom

@aagarwal1012 Please refer the screenshot
p_20180916_110911

I want the title to be empty so I tried to pass null but that did not work, so I passed an empty text.
The body text is at the bottom I want it below the image as shown in your demo

iconImageAssetPath should accept a widget or please add second argument

iconImageAssetPath accepts an asset path (String). It would be cool if I could use other widgets to show as well as a standard vector image. The most usable setting would be a widget. The user could provide one or the other and the ctor could check that one or the other is null. Nice work by the way - Thank you

Solution for setState not working

Hi, I wanted to use this package one week ago but I couldn't because setState doesn't work and reading the package's issues, you wrote that you couldn't find the problem.

I was doing my own package and faced the same problem. I fixed it by moving the initState logic to build method. The problem is when you use setState in parent, child isn't created again and initState isn't called. If you move that crucial logic to build (or maybe another better place), it will work.

Is there anyway to add radio buttons?

Is your feature request related to a problem? Please describe.
Is there anyway to add radio buttons or buttons So that in my app let's say I want the user to be able to choose a language before showing the Homepage?

White gaps if trying to use an image with full width

Hi, I'm setting an horizontal image as my page's image as so:

mainImage: Image.asset( 'assets/Login1Icon.jpg', fit: BoxFit.fitWidth, alignment: Alignment.topCenter, )),

But the image doesn't cover the full width of the screen:
whitegap

Option to configure screen physics on lateral drag

I try to find an option to change de physic of movement to next and back page, to use less screen drag to change, but not found any option.

I want one parameter to define that movement weight ou percentage, to configure one more comfortable to my users.

Thank you!

Assert error, even with no pages provided

Describe the bug
Assert error.

main.<fn>
FlutterError.reportError
RenderObject._debugReportException
RenderObject.layout
_RenderInputPadding.performLayout
RenderObject.layout
_RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout
RenderObject.layout
RenderPadding.performLayout
RenderObject.layou
I/flutter ( 4847): ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
I/flutter ( 4847): The following assertion was thrown during performLayout():
I/flutter ( 4847): BoxConstraints forces an infinite width.
I/flutter ( 4847): These invalid constraints were provided to RenderCustomPaint's layout() function by the following
I/flutter ( 4847): function, which probably computed the invalid constraints in question:
I/flutter ( 4847):   RenderConstrainedBox.performLayout (package:flutter/src/rendering/proxy_box.dart:259:13)
I/flutter ( 4847): The offending constraints were:
I/flutter ( 4847):   BoxConstraints(w=Infinity, 36.0<=h<=Infinity)
I/flutter ( 4847):
I/flutter ( 4847): When the exception was thrown, this was the stack:
I/flutter ( 4847): #0      BoxConstraints.debugAssertIsValid.<anonymous closure>.throwError 
I/flutter ( 4847): #1      BoxConstraints.debugAssertIsValid.<anonymous closure> 
I/flutter ( 4847): #2      BoxConstraints.debugAssertIsValid 
I/flutter ( 4847): #3      RenderObject.layout 
I/flutter ( 4847): #4      RenderConstrainedBox.performLayout 
I/flutter ( 4847): #5      RenderObject.layout 
I/flutter ( 4847): #6      _RenderInputPadding.performLayout 
I/flutter ( 4847): #7      RenderObject.layout 
I/flutter ( 4847): #8      _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout 
I/flutter ( 4847): #9      RenderObject.layout 
I/flutter ( 4847): #10     RenderPadding.performLayout 
I/flutter ( 4847): #11     RenderObject.layout 
I/flutter ( 4847): #12     RenderFlex.performLayout 
I/flutter ( 4847): #13     RenderObject.layout 
I/flutter ( 4847): #14     RenderStack.performLayout 
I/flutter ( 4847): #15     RenderObject.layout 
I/flutter ( 4847): #16     MultiChildLayoutDelegate.layoutChild 
I/flutter ( 4847): #17     _ScaffoldLayout.performLayout 
I/flutter ( 4847): #18     MultiChildLayoutDelegate._callPerformLayout 
I/flutter ( 4847): #19     RenderCustomMultiChildLayoutBox.performLayout 
I/flutter ( 4847): #20     RenderObject.layout 
I/flutter ( 4847): #21     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout 
I/flutter ( 4847): #22     RenderObject.layout 
I/flutter ( 4847): #23     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout 
I/flutter ( 4847): #24     _RenderCustomClip.performLayout 
I/flutter ( 4847): #25     RenderObject.layout 
I/flutter ( 4847): #26     MultiChildLayoutDelegate.layoutChild 
I/flutter ( 4847): #27     _ScaffoldLayout.performLayout 
I/flutter ( 4847): #28     MultiChildLayoutDelegate._callPerformLayout 
I/flutter ( 4847): #29     RenderCustomMultiChildLayoutBox.performLayout 
I/flutter ( 4847): #30     RenderObject.layout 
I/flutter ( 4847): #31     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout 
I/flutter ( 4847): #32     RenderObject.layout 
I/flutter ( 4847): #33     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout 
I/flutter ( 4847): #34     _RenderCustomClip.performLayout 
I/flutter ( 4847): #35     RenderObject.layout 
I/flutter ( 4847): #36     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout 
I/flutter ( 4847): #37     RenderObject.layout 
I/flutter ( 4847): #38     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout 
I/flutter ( 4847): #39     RenderObject.layout 
I/flutter ( 4847): #40     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout 
I/flutter ( 4847): #41     RenderObject.layout 
I/flutter ( 4847): #42     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout 
I/flutter ( 4847): #43     RenderObject.layout 
I/flutter ( 4847): #44     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout 
I/flutter ( 4847): #45     RenderObject.layout 
I/flutter ( 4847): #46     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout 
I/flutter ( 4847): #47     RenderObject.layout 
I/flutter ( 4847): #48     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout 
I/flutter ( 4847): #49     RenderObject.layout 
I/flutter ( 4847): #50     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout 
I/flutter ( 4847): #51     RenderOffstage.performLayout 
I/flutter ( 4847): #52     RenderObject.layout 
I/flutter ( 4847): #53     RenderStack.performLayout 
I/flutter ( 4847): #54     RenderObject.layout 
I/flutter ( 4847): #55     __RenderTheatre&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout 
I/flutter ( 4847): #56     RenderObject.layout 
I/flutter ( 4847): #57     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout 
I/flutter ( 4847): #58     RenderObject.layout 
I/flutter ( 4847): #59     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout 
I/flutter ( 4847): #60     RenderObject.layout 
I/flutter ( 4847): #61     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout 
I/flutter ( 4847): #62     RenderObject.layout 
I/flutter ( 4847): #63     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout 
I/flutter ( 4847): #64     RenderObject.layout 
I/flutter ( 4847): #65     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout 
I/flutter ( 4847): #66     RenderObject.layout 
I/flutter ( 4847): #67     RenderView.performLayout 
I/flutter ( 4847): #68     RenderObject._layoutWithoutResize 
I/flutter ( 4847): #69     PipelineOwner.flushLayout 
I/flutter ( 4847): #70     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding.drawFrame 
I/flutter ( 4847): #71     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding&WidgetsBinding.drawFrame 
I/flutter ( 4847): #72     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding._handlePersistentFrameCallback 
I/flutter ( 4847): #73     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback 
I/flutter ( 4847): #74     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame 
I/flutter ( 4847): #75     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.scheduleWarmUpFrame.<anonymous closure> 
I/flutter ( 4847): #77     _Timer._runTimers (dart:isolate-patch/timer_impl.dart:382:19)
I/flutter ( 4847): #78     _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:416:5)
I/flutter ( 4847): #79     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:171:12)
I/flutter ( 4847): (elided one frame from package dart:async-patch)
I/flutter ( 4847):
I/flutter ( 4847): The following RenderObject was being processed when the exception was fired:
I/flutter ( 4847):   RenderConstrainedBox#1020b relayoutBoundary=up9 NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 4847):   creator: ConstrainedBox ← _InputPadding ← Semantics ← RawMaterialButton ← FlatButton ← DoneButton
I/flutter ( 4847):   ← Padding ← Row ← DefaultTextStyle ← Positioned ← PageIndicatorButtons ← Stack ← ⋯
I/flutter ( 4847):   parentData: offset=Offset(0.0, 0.0) (can use size)
I/flutter ( 4847):   constraints: BoxConstraints(unconstrained)
I/flutter ( 4847):   size: MISSING
I/flutter ( 4847):   additionalConstraints: BoxConstraints(w=Infinity, 36.0<=h<=Infinity)
I/flutter ( 4847): This RenderObject had the following descendants (showing up to depth 5):
I/flutter ( 4847):   RenderCustomPaint#f1a00 NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 4847):     _RenderInkFeatures#f4690 NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 4847):       RenderSemanticsGestureHandler#613ff NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 4847):         RenderPointerListener#c8766 NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 4847):           RenderPadding#fde30 NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 4847): 

To Reproduce

Flutter doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel beta, v1.5.4-hotfix.2, on Microsoft Windows [Version 10.0.17763.475], locale en-US)

[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    X Android license status unknown.
or visit https://flutter.dev/setup/#android-setup for detailed instructions.
[√] Android Studio (version 3.3)
[√] VS Code (version 1.33.1)
[√] Connected device (1 available)

! Doctor found issues in 1 category.

Steps to reproduce the behavior (this sample code):

 @override
  Widget build(BuildContext context) {
    Log.logFunctionName("_Onboarding", "build()");
    // Store when we have a context
    stateData.setBuildContext(context);

    // TODO: Remove when done testing
    _initPages();

    return WillPopScope(
        onWillPop: () async => false,
        child: Scaffold(
          appBar: AppBar(
            backgroundColor: Colors.transparent,
            centerTitle: true,
            elevation: 0.0,
            title: textTitle,
          ),
          body: Builder(
            builder: (context) => IntroViewsFlutter(
                  [],
                  onTapSkipButton: _finish,
                  onTapDoneButton: _finish,
                  pageButtonTextStyles: TextStyle(
                    color: Colors.white,
                    fontSize: 18.0,
                  ),
                  showSkipButton: true,
                ),
        )));
  }

Expected behavior
No errors. It still renders, but the exceptions are not a good sign.

Smartphone (please complete the following information):

  • Pixel 2 Emulator on Android Pie

Disable dragging / sliding not implemented

Feature request
Enabling / Disabling dragging / sliding / scrolling

Clean Solution
A boolean value for IntroViewsFlutter like isDraggingEnabled or isScrollingEnabled would be great

Alternative
I solved it with:

fullTransition: enabled ? 300 : double.infinity,

Rapid clicks on `NEXT` and `BACK` produce flutter error

Describe the bug
Rapid clicks on NEXT and BACK buttons increments internal index out of range producing a flutter error.

To Reproduce
Steps to reproduce the behavior:

  1. Enable NEXT or BACK buttons
  2. Click several times rapidly on NEXT or BACK
  3. See flutter error

Expected behavior
No flutter error

No named parameter with the name 'resizeT oAvoidBottomPadding'.

Flutter version 2 with intro_views_flutter
Hello
After I update Flutter SDK to version 2 I get this error in intro_views_flutter plugin
Error: No named parameter with the name 'resizeToAvoidBottomPadding'.

pubspec.yaml
intro_views_flutter: ^2.8.2

Console

C:\Users\wael1\AndroidStudioProjects\stem_cells>flutter build apk

Building without sound null safety
For more information see https://dart.dev/null-safety/unsound-null-safety

/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/intro_views_flutter-2.8.2/lib/intro_views_flutter.dart:237:7: Error: No named parameter with the name 'resizeT
oAvoidBottomPadding'.
resizeToAvoidBottomPadding: false,
^^^^^^^^^^^^^^^^^^^^^^^^^^
/C:/src/flutter/packages/flutter/lib/src/material/scaffold.dart:1451:9: Context: Found this candidate, but the arguments don't match.
const Scaffold({
^^^^^^^^

FAILURE: Build failed with an exception.

  • Where:
    Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 991

  • What went wrong:
    Execution failed for task ':app:compileFlutterBuildRelease'.

Process 'command 'C:\src\flutter\bin\flutter.bat'' finished with non-zero exit value 1

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 14m 9s
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done 851.7s
Gradle task assembleRelease failed with exit code 1

Safe area - It doesn't render properly on iPhones with notch

Describe the bug
Safe area - It doesn't render properly on iPhones with notch

To Reproduce
Steps to reproduce the behavior:

  1. Run on any iPhone devices with a notch

Expected behavior
Implement safe area

Screenshots
If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

  • Device: iPhoneX

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.