profile edit happens without requiring save button

This commit is contained in:
Christien Rioux 2024-08-01 14:30:06 -05:00
parent b6a812af87
commit 030f9d9651
19 changed files with 499 additions and 266 deletions

View file

@ -8,6 +8,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_spinkit/flutter_spinkit.dart';
import 'package:flutter_sticky_header/flutter_sticky_header.dart';
import 'package:meta/meta.dart';
import 'package:quickalert/quickalert.dart';
import 'package:sliver_expandable/sliver_expandable.dart';
@ -27,6 +28,38 @@ extension SizeToFixExt on Widget {
);
}
extension FocusExt<T> on Widget {
Focus focus(
{Key? key,
FocusNode? focusNode,
FocusNode? parentNode,
bool autofocus = false,
ValueChanged<bool>? onFocusChange,
FocusOnKeyEventCallback? onKeyEvent,
bool? canRequestFocus,
bool? skipTraversal,
bool? descendantsAreFocusable,
bool? descendantsAreTraversable,
bool includeSemantics = true,
String? debugLabel}) =>
Focus(
key: key,
focusNode: focusNode,
parentNode: parentNode,
autofocus: autofocus,
onFocusChange: onFocusChange,
onKeyEvent: onKeyEvent,
canRequestFocus: canRequestFocus,
skipTraversal: skipTraversal,
descendantsAreFocusable: descendantsAreFocusable,
descendantsAreTraversable: descendantsAreTraversable,
includeSemantics: includeSemantics,
debugLabel: debugLabel,
child: this);
Focus onFocusChange(void Function(bool) onFocusChange) =>
Focus(onFocusChange: onFocusChange, child: this);
}
extension ModalProgressExt on Widget {
BlurryModalProgressHUD withModalHUD(BuildContext context, bool isLoading) {
final theme = Theme.of(context);