Skip to content

Instantly share code, notes, and snippets.

@coder-Aayush
coder-Aayush / findings.md
Last active April 5, 2023 15:12
Link widget not working from keyboard on web #97863

Issue:- flutter/flutter#97863

Description

This issue is regarding the Flutter web, and keyboard is not responding when space or enter key is being tapped.

Platform: web url_launcher: ^6.1.10

Code Sample
@coder-Aayush
coder-Aayush / findings.md
Last active April 5, 2023 14:43
Flutter Issue - [web] Mouse down tap is lost #124191

Issue:- flutter/flutter#124191

Description:- This is Flutter web issue, when clicking on on red container which is wrapped with GestureDetector, the onTapDown callback should be executed first and then onDoubleTap should be exectured.

Platform: web

Code Sample
@coder-Aayush
coder-Aayush / findings.md
Last active April 5, 2023 14:04
Flutter Issue - [webview_flutter] Rapid taps are being throttled on iOS #124118

Issue:- flutter/flutter#124118

Description:-

The issue is for webview_flutter plugin, which mention there is throttled on iOS when there is rappid taps.

Plugin:- https://pub.dev/packages/webview_flutter

Issue

I checked this issue on iPad mini (6th gen) and real android device and simulator, on iPad mini (6th gen) i can reproduce the issue but cannot reproduce this issue on android real device.

@coder-Aayush
coder-Aayush / login_view.dart
Created November 23, 2022 16:07
Login View
import 'package:firebase_auth_riverpod/src/core/widgets/custom_button.dart';
import 'package:firebase_auth_riverpod/src/feature/auth/providers/authentication_provider.dart';
import 'package:firebase_auth_riverpod/src/feature/auth/views/signup_view.dart';
import 'package:flutter/material.dart';
import 'package:flutter_signin_button/button_list.dart';
import 'package:flutter_signin_button/button_view.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
// ignore: depend_on_referenced_packages
import 'package:flutter_hooks/flutter_hooks.dart';
@coder-Aayush
coder-Aayush / signup_view.dart
Created November 23, 2022 15:58
Signup View
import 'package:firebase_auth_riverpod/src/core/widgets/custom_button.dart';
import 'package:firebase_auth_riverpod/src/feature/auth/providers/authentication_provider.dart';
import 'package:flutter/material.dart';
import 'package:flutter_signin_button/button_list.dart';
import 'package:flutter_signin_button/button_view.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
// ignore: depend_on_referenced_packages
import 'package:flutter_hooks/flutter_hooks.dart';
class SignupView extends HookConsumerWidget {
@coder-Aayush
coder-Aayush / signup_view.dart
Created November 22, 2022 20:23
Signup View
ref.listen(authNotifierProvider, (previous, next) {
next.maybeWhen(
orElse: () => null,
authenticated: (user) {
// Navigate to any screen
},
unauthenticated: (message) =>
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(message!),
@coder-Aayush
coder-Aayush / signup_view.dart
Last active November 23, 2022 13:59
Signup View
Center(
child: CustomButton(
title: 'Signup',
isDisabled: false,
onPressed: () => ref.read(authNotifierProvider.notifier).signup(email: email.text,password: password.text),
loading: ref.watch(authNotifierProvider).maybeWhen(orElse: () => false, loading: () => true),
),
)
@coder-Aayush
coder-Aayush / signup_view.dart
Last active November 23, 2022 14:00
Signup View
import 'package:firebase_auth_riverpod/src/feature/auth/views/login_view.dart';
import 'package:flutter/material.dart';
import 'package:flutter_signin_button/button_list.dart';
import 'package:flutter_signin_button/button_view.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
// ignore: depend_on_referenced_packages
import 'package:flutter_hooks/flutter_hooks.dart';
class SignupView extends HookConsumerWidget {
const SignupView({super.key});
@coder-Aayush
coder-Aayush / login_view.dart
Last active November 23, 2022 13:54
Login View
import 'package:firebase_auth_riverpod/src/core/widgets/custom_button.dart';
import 'package:firebase_auth_riverpod/src/feature/auth/views/signup_view.dart';
import 'package:flutter/material.dart';
import 'package:flutter_signin_button/button_list.dart';
import 'package:flutter_signin_button/button_view.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
// ignore: depend_on_referenced_packages
import 'package:flutter_hooks/flutter_hooks.dart';
class LoginView extends HookConsumerWidget {
@coder-Aayush
coder-Aayush / authentication_provider.dart
Created November 22, 2022 19:18
Authentication State Provider
import 'package:firebase_auth_riverpod/src/feature/auth/data_source/auth_data_source.dart';
import 'package:firebase_auth_riverpod/src/feature/auth/providers/state/authentication_state.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
class AuthNotifier extends StateNotifier<AuthenticationState> {
AuthNotifier(this._dataSource) : super(const AuthenticationState.initial());
final AuthDataSource _dataSource;
Future<void> login({required String email, required String password}) async {