Merge branch 'flutterflow'

This commit is contained in:
Jonatas Antunes Messias 2024-06-14 12:14:18 -03:00
commit 342d6b32b9
3 changed files with 21 additions and 4 deletions

View File

@ -44,8 +44,8 @@
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; }; 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
6436409327A31CD900820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = "<group>"; }; 6436409927A31CD100820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = "<group>"; };
6436409227A31CDB00820AF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; }; 6436409627A31CD200820AF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
/* End PBXFileReference section */ /* End PBXFileReference section */
@ -225,8 +225,8 @@
6436409C27A31CD800820AF7 /* InfoPlist.strings */ = { 6436409C27A31CD800820AF7 /* InfoPlist.strings */ = {
isa = PBXVariantGroup; isa = PBXVariantGroup;
children = ( children = (
6436409327A31CD900820AF7 /* pt */, 6436409927A31CD100820AF7 /* pt */,
6436409227A31CDB00820AF7 /* en */, 6436409627A31CD200820AF7 /* en */,
); );
name = InfoPlist.strings; name = InfoPlist.strings;
sourceTree = "<group>"; sourceTree = "<group>";

View File

@ -131,6 +131,9 @@ Future singInActionApp(
FFAppState().status = PhpGroup.loginCall.userStatus( FFAppState().status = PhpGroup.loginCall.userStatus(
(loginCall.jsonBody ?? ''), (loginCall.jsonBody ?? ''),
)!; )!;
FFAppState().name = PhpGroup.loginCall.userName(
(loginCall.jsonBody ?? ''),
)!;
FFAppState().isLogged = true; FFAppState().isLogged = true;
context.goNamed( context.goNamed(

View File

@ -57,6 +57,9 @@ class FFAppState extends ChangeNotifier {
await _safeInitAsync(() async { await _safeInitAsync(() async {
_status = await secureStorage.getString('ff_status') ?? _status; _status = await secureStorage.getString('ff_status') ?? _status;
}); });
await _safeInitAsync(() async {
_name = await secureStorage.getString('ff_name') ?? _name;
});
} }
void update(VoidCallback callback) { void update(VoidCallback callback) {
@ -208,6 +211,17 @@ class FFAppState extends ChangeNotifier {
void deleteStatus() { void deleteStatus() {
secureStorage.delete(key: 'ff_status'); secureStorage.delete(key: 'ff_status');
} }
String _name = '';
String get name => _name;
set name(String value) {
_name = value;
secureStorage.setString('ff_name', value);
}
void deleteName() {
secureStorage.delete(key: 'ff_name');
}
} }
void _safeInit(Function() initializeField) { void _safeInit(Function() initializeField) {