Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swiping back while flushbar is dismissing freezes swiping animation #7

Closed
tomk9 opened this issue Feb 25, 2021 · 7 comments
Closed
Labels
bug Something isn't working

Comments

@tomk9
Copy link

tomk9 commented Feb 25, 2021

Video:

LDQK8580.MP4

Steps to Reproduce:

iPhone only

  1. Go to next page.
  2. Show flushbar.
  3. Start swiping back and release while flushbar is dismissing.
  4. Swiping animation freezes.

Code:

import 'package:another_flushbar/flushbar.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flushbar Error',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('First Page'),
      ),
      body: Center(
        child: RaisedButton(
          onPressed: () {
            Navigator.push(
              context,
              MaterialPageRoute(
                builder: (context) => SecondPage(),
              ),
            );
          },
          child: Text(
            'Go to second page',
          ),
        ),
      ),
    );
  }
}

class SecondPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Second Page'),
      ),
      body: Center(
        child: RaisedButton(
          onPressed: () {
            Flushbar(
              title: "Hey Ninja",
              message:
                  "Lorem Ipsum is simply dummy text of the printing and typesetting industry",
              duration: Duration(seconds: 3),
            )..show(context);
          },
          child: Text(
            'Show flushbar',
          ),
        ),
      ),
    );
  }
}
@cmdrootaccess cmdrootaccess added the bug Something isn't working label Feb 25, 2021
@cmdrootaccess
Copy link
Owner

testing , will make new commit shortly

@Albert-Jan
Copy link

With Flutter 2.0, they introduced a MessengerScaffold to solve exactly this issue. https://flutter.dev/docs/release/breaking-changes/scaffold-messenger

The ScaffoldMessenger now handles SnackBars in order to persist across routes and always be displayed on the current Scaffold. By default, a root ScaffoldMessenger is included in the MaterialApp, but you can create your own controlled scope for the ScaffoldMessenger to further control which Scaffolds receive your SnackBars.

@cmdrootaccess
Copy link
Owner

cmdrootaccess commented Mar 4, 2021

okay , thanks for the info. i will make the update as soon as possible.

@cmdrootaccess
Copy link
Owner

fixed in another_flushbar: ^1.10.23

@tomk9
Copy link
Author

tomk9 commented Jun 17, 2021

I tested with another_flushbar: ^1.10.23 and the bug still exists. @cmdrootaccess should reopen issue.

@datpt11
Copy link

datpt11 commented Aug 18, 2022

same issue

@synstin
Copy link

synstin commented Oct 8, 2023

same issue any update? @cmdrootaccess

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants