Coder Social home page Coder Social logo

bizz84 / time_tracker_flutter_course Goto Github PK

View Code? Open in Web Editor NEW
405.0 25.0 169.0 501 KB

Source code for every lesson in the "Flutter & Firebase: Build a Complete App for iOS & Android" course on Udemy

Home Page: https://nnbd.me/ff-udemy

License: MIT License

Kotlin 0.15% Swift 0.39% Objective-C 0.04% Dart 98.10% Ruby 1.32%
flutter firebase udemy

time_tracker_flutter_course's Issues

old code

flat button, Raisedbutton, not working
Firebase rules not working

error in debug console on anonymous logout

I received the following error in the debug console when clicking "logout". Note: the error might only appear using the latest packages.

flutter: 'package:provider/src/provider.dart': Failed assertion: line 202 pos 7: 'context.owner.debugBuilding ||
          listen == false ||
          debugIsInInheritedProviderUpdate': Tried to listen to a value exposed with provider, from outside of the widget tree.
This is likely caused by an event handler (like a button's onPressed) that called
Provider.of without passing `listen: false`.
To fix, write:
Provider.of<AuthBase>(context, listen: false);
It is unsupported because may pointlessly rebuild the widget associated to the
event handler, when the widget tree doesn't care about the value.
The context used was: AccountPage(dependencies: [_LocalizationsScope-[GlobalKey#7b2b3], _InheritedProviderScope<User>, _InheritedCupertinoTheme])

Anonymous SignIn does not responding anything.

image
image
I am stuck at this place. so I can't move further in the course.
That line was not returning anything. I have waited for a long time also.

  • I have checked the mobile internet status also. The internet was turned on.
  • I have also rechecked whether I have configured my firebase correctly.

error running the app

Launching lib\main.dart on Redmi Note 7 in debug mode...
lib\main.dart:1
√ Built build\app\outputs\flutter-apk\app-debug.apk.
E/AndroidRuntime(32412): FATAL EXCEPTION: main
E/AndroidRuntime(32412): Process: com.arundev.time_tracker, PID: 32412
E/AndroidRuntime(32412): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.arundev.time_tracker/com.arundev.time_tracker.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.arundev.time_tracker.MainActivity" on path: DexPathList[[zip file "/data/app/com.arundev.time_tracker-kXIlP1l7-TgTUT1rzVndFA==/base.apk"],nativeLibraryDirectories=[/data/app/com.arundev.time_tracker-kXIlP1l7-TgTUT1rzVndFA==/lib/arm64, /data/app/com.arundev.time_tracker-kXIlP1l7-TgTUT1rzVndFA==/base.apk!/lib/arm64-v8a, /system/lib64, /system/product/lib64]]

error running tests on latest packages

Received the following error when running tests on the latest packages.

Test: "WHEN user enters a valid email and passwordAND user taps on the sign-in buttonTHEN
signInWithEmailAndPassword is calledAND user is signed in"

══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following assertion was thrown running a test:
Tried to listen to a value exposed with provider, from outside of the widget tree.

This is likely caused by an event handler (like a button's onPressed) that called
Provider.of without passing `listen: false`.

To fix, write:
Provider.of<AuthBase>(context, listen: false);

It is unsupported because may pointlessly rebuild the widget associated to the
event handler, when the widget tree doesn't care about the value.

The context used was: EmailSignInFormStateful(dirty, state: _EmailSignInFormStatefulState#4ce1f)
'package:provider/src/provider.dart':
Failed assertion: line 202 pos 7: 'context.owner.debugBuilding ||
          listen == false ||
          debugIsInInheritedProviderUpdate'

When the exception was thrown, this was the stack:
#2      Provider.of (package:provider/src/provider.dart:202:7)
#3      _EmailSignInFormStatefulState._submit (package:time_tracker_flutter_course/app/sign_in/email_sign_in_form_stateful.dart:46:29)
#4      _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:992:19)
#5      _InkResponseState.build.<anonymous closure> (package:flutter/src/material/ink_well.dart:1098:38)
#6      GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:184:24)
#7      TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:524:11)
#8      BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:284:5)
#9      BaseTapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:219:7)
#10     PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:477:9)
#11     PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:78:12)
#12     PointerRouter._dispatchEventToRoutes.<anonymous closure> (package:flutter/src/gestures/pointer_router.dart:124:9)
#13     _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:377:8)
#14     PointerRouter._dispatchEventToRoutes (package:flutter/src/gestures/pointer_router.dart:122:18)
#15     PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:108:7)
#16     GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:220:19)
#17     GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:200:22)
#18     TestWidgetsFlutterBinding.dispatchEvent (package:flutter_test/src/binding.dart:471:11)
#19     WidgetTester.sendEventToBinding.<anonymous closure> (package:flutter_test/src/widget_tester.dart:654:15)
#20     WidgetTester.sendEventToBinding.<anonymous closure> (package:flutter_test/src/widget_tester.dart:653:39)
#23     TestAsyncUtils.guard (package:flutter_test/src/test_async_utils.dart:72:41)
#24     WidgetTester.sendEventToBinding (package:flutter_test/src/widget_tester.dart:653:27)
#25     TestGesture.up.<anonymous closure> (package:flutter_test/src/test_pointer.dart:422:24)
#26     TestGesture.up.<anonymous closure> (package:flutter_test/src/test_pointer.dart:420:39)
#29     TestAsyncUtils.guard (package:flutter_test/src/test_async_utils.dart:72:41)
#30     TestGesture.up (package:flutter_test/src/test_pointer.dart:420:27)
#31     WidgetController.tapAt.<anonymous closure> (package:flutter_test/src/controller.dart:263:21)
#43     WidgetController.startGesture (package:flutter_test/src/controller.dart)
#54     FakeAsync.flushMicrotasks (package:fake_async/fake_async.dart:192:32)
#55     AutomatedTestWidgetsFlutterBinding.runTest.<anonymous closure> (package:flutter_test/src/binding.dart:1149:17)
#56     AutomatedTestWidgetsFlutterBinding.runTest.<anonymous closure> (package:flutter_test/src/binding.dart:1137:35)
(elided 42 frames from class _AssertionError, dart:async, dart:async-patch, and package:stack_trace)

The test description was:
  WHEN user enters a valid email and passwordAND user taps on the sign-in buttonTHEN
  signInWithEmailAndPassword is calledAND user is signed in

registration with email verification

Future<User> signInWithEmailAndPassword(String email, String password) async {

@bizz84
i am enjoing your tutorial
but i want to use email verification , if user register with email

  @override
  Future<User> signInWithEmailAndPassword(String email, String password) async {
    final authResult = await _firebaseAuth.signInWithEmailAndPassword(
        email: email, password: password);
    print('aaa');
    if (authResult.user.isEmailVerified) {
      return _userFromFirebase(authResult.user);
    } else {
      return _userFromFirebase(null);
    }
  }

  @override
  Future<User> createUserWithEmailAndPassword(
      String email, String password) async {
    final authResult = await _firebaseAuth.createUserWithEmailAndPassword(
        email: email, password: password);
    await authResult.user.sendEmailVerification();

    return _userFromFirebase(authResult.user);
  }

but, with that code, although isEmailVerified = is false
and return return _userFromFirebase(null);
but still go to home page

ty before

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.