by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 03:03
    RollyPeres commented #1429
  • 02:59
    chimon2000 commented #1429
  • 02:58
    chimon2000 commented #1429
  • 02:57
    chimon2000 commented #1429
  • 02:44
    ayumax starred felangel/bloc
  • 02:04
    Chren commented #1616
  • 01:59
    rrousselGit commented #1429
  • 01:39
    rrousselGit commented #1429
  • 01:37
    felangel edited #1429
  • 01:23
    felangel commented #1429
  • 01:00
    rrousselGit commented #1429
  • 00:55
    felangel commented #1429
  • 00:54
    rrousselGit commented #1429
  • 00:49
    rrousselGit commented #1429
  • 00:44
    rrousselGit commented #1429
  • 00:44
    rrousselGit commented #1429
  • 00:35
    rrousselGit commented #1429
  • 00:35
    febryardiansyah commented #1575
  • 00:33
    RollyPeres commented #1429
  • 00:31
    felangel closed #1616
andesappal
@andesappal
Is there a button somewhere on macOS where I can extinguish Apple, the company? Where is this button?!
Felix Angelov
@felangel
You need to add the reverse client id to the info.plist
andesappal
@andesappal
Hi @felangel! Something's not right:
image.png
I need to pause this issue of getting your Flutter-Bloc-Firebase project up on iOS and Android. I'll get back to this in two days I hope.
Ghost
@ghost~5bc0fb68d73408ce4fab4784
@andesappal You need to have your own apple developer account setup to be able to build the ios version of the firebase-todos. My suggestion, unless you want to drop the 99.00 to apple is skip iOS and just roll with android.
andesappal
@andesappal
I can't! Very unfortunately, I need to service iOS.
If you find the 'Terminate Apple' button, please let me know.
Ghost
@ghost~5bc0fb68d73408ce4fab4784
@andesappal You need to create a provisioning profile in your apple dev account.
Also you'll need to make sure you bundle ID is the same as what you created in your apple account.
andesappal
@andesappal
Thanks @warriorCoder, will look into it until it's solved, very soon
George Chailazopoulos
@spiritinlife
Hello, are there any examples of handling deep links in conjuction with flutter bloc. I am thinking a top level bloc could listen for deep links and emit states depending on the uri that will be listened from a bloclistener and navigate/push the relevant screen. What do you think of this approach ?
Felix Angelov
@felangel
George that makes sense to me 👍
Don’t have any examples but if you have time and the approach works well for you I’d welcome any PR 😄
Felix Angelov
@felangel
@/all I'm pleased to announce we're migrating from gitter to discord. You can join the new discord server at https://discord.gg/Hc5KD3g :tada:
Jonathan White
@ThinkDigitalSoftware
Sweet!
andesappal
@andesappal
+1!
Manuel Bojato
@KingDarBoja
:rocket:
Naranmandakh
@Naranmandakh
How you guys solve state duplication ?
For example: Loading
every bloc has Loading state
Felix Angelov
@felangel
please join the discord server at https://discord.gg/Hc5KD3g
We’ve migrated off of gitter
Sergiy
@sergiyvergun
Hey everyone. How can I initialize the database using bloc pattern to make sure its instantiated only once. At the moment it's done by covering the app with provider, that contains the database`s dao and getting the dao wherever it's needed, the problem is that it needs the context to get dao. What can you suggest?
image.png
tapizquent
@tapizquent
Guys. Please read what @felangel has written before posting more here.
please join the discord server at https://discord.gg/Hc5KD3g
janardhanmupparaju
@janardhanmupparaju

Guys,

In my app navigating multiple screens and after came back to HomeScreen in HomeScreen menu click on logout it should go loginScreen but not happening using bloc.
example-1:
i am using bloc in my application and after login->homePage->tabBars->newScreen->anotherNewScreen->click on back to Home screen and if i click on logout it is not navigating to login screen.
example -2:
i am using this example
https://github.com/boukmi/flutter_login
->in the above example also not working multiple navigation.
->in the above example i just added the new screen and navigating from page 1 to newScreen and in newScreen click on logout. then it should move to login screen but not working.

Ghost
@ghost~5bc0fb68d73408ce4fab4784
@janardhanmupparaju Please read what @felangel has written before posting more here.
please join the discord server at https://discord.gg/Hc5KD3g
janardhanmupparaju
@janardhanmupparaju

Navigator.of(context).popUntil(ModalRoute.withName('/'));
// then add/dispatch LoggedOut()

Thank you @felangel , it was working. i just added that line before dispatch LoggedOut().

Sergiy
@sergiyvergun
Ghost
@ghost~5e70f246d73408ce4fdd1518
hello!
oh, you went to Discord? ok!
Omkar Manjrekar
@manjrekarom
Hii. This may be an offtopic question but I am figuring out a way to deduplicate my code. I have common functionality like error states being used in a lot of features. Is there a way I can possibly write this code just once and be done with it?? Currently I am pasting it all over.
Felix Angelov
@felangel
please join the discord server at https://discord.gg/Hc5KD3g
We’ve migrated off of gitter
dk14300
@dk14300
hi guys
i am new flutter_bloc i had requirement for dropdownmenu with bloc listeners can any body give me the example fully
dk14300
@dk14300
hi guys
does anyone help me on the flutter bloc returning null before i got the values
dk14300
@dk14300
guys anyone ping me to get clear my error
Teye-Doku
@Teye-Doku
hello family, any guide for flutter ui building
Felix Angelov
@felangel
please join the discord server at https://discord.gg/Hc5KD3g
We’ve migrated off of gitter
Absolute Virtue
@AbsoluteVirtueXI
hi all i am reading an asnwer from stackover flow saying: "The flutter bloc requires you to yield a new instance of the state, instead of modifying the currentState."
Is it true ? i mean ofc i like the functional way of returning a total new state, and i am pretty it is the way to go to avoid bug in the future. But can i mutate a state instead of instantiating a new one ?
for example i have this counter state:
// State
class Counter extends Equatable{
  final int value;
  Counter(this.value);

  @override
  List<Object> get props => [value];

  @override
  bool get stringify => true;

  Counter increment() => Counter(this.value + 1);
  Counter decrement() => Counter(this.value - 1);
}
i feel like it is a bit bad to increment() and decrement() this way, by returning a new instance
oh i will switch to discord
harnit-bakshi
@harnit-bakshi
I am testing my widget and mocking my bloc to do so
I had a question about setting up the states via the whenListen method, I was expecting that the states would not be fired until the widgetTester.pump is called. But seems like when I call widgetTester.pumpWidget all the states are triggered straightaway?
My sample code below, the _buildApp which calls the pumpWidget starts triggering all states straightaway. Please let me know if I am doing something wrong? I have followed the suggestions in this ticket: felangel/bloc#655

void main() {
  group("AccountLinking Screen", () {
    MockUserDataSourceBloc mockUserDataSourceBloc;
    NavigatorObserver mockNavigatorObserver;

    setUp(() {

      TestWidgetsFlutterBinding.ensureInitialized();
      mockUserDataSourceBloc = di.sl<UserDataSourceBloc>();
      mockNavigatorObserver = MockNavigatorObserver();
    });

    tearDown(() {
      mockUserDataSourceBloc.close();
    });

    Future<void> _buildApp(WidgetTester tester) async {
      await tester.pumpWidget(
        MaterialApp(
          title: "Test App",
          home: Scaffold(
            body: BlocProvider<UserDataSourceBloc>(
              create: (_) => mockUserDataSourceBloc,
              child: UserDataSourceView(),
            ),
          ),
          navigatorObservers: [mockNavigatorObserver],
          routes: routes,
        ),
      );
    }

    testWidgets("should update datasource list when linking succeeds",
        (WidgetTester tester) async {
      final expectedStates = [
        UserDataSourceInitial(),
        GetUserDataSourcesLoaded(userDataSources: []),
        LinkUserDataSourceLoading(),
        LinkUserDataSourceLoaded(
          userDataSource: UserDataSource(
            userDataSourceId: "1",
            userId: "uuid",
            status: DataSourceStatus.LINKED,
          ),
        ),
      ];

      whenListen(
        mockUserDataSourceBloc,
        Stream.fromIterable(expectedStates),
      );

      await _buildApp(tester);
    });
  });
}