This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:ui' as ui; | |
import 'package:shared_preferences/shared_preferences.dart'; | |
Future<void> setAppLanguageDynamic( | |
BuildContext context, String languageCode) async { | |
final locale = ui.PlatformDispatcher.instance.locale; | |
final String languageOnly = locale.languageCode; | |
bool found = false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TutorialCoachMark createPageWalkthrough(BuildContext context) => | |
TutorialCoachMark( | |
targets: createWalkthroughTargets(context), | |
onFinish: () async { | |
safeSetState(() => _model.pageWalkthroughController = null); | |
FFAppState().pageWalkthroughIsDone = true; | |
}, | |
onSkip: () { | |
() async { | |
FFAppState().pageWalkthroughIsDone = true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Scroll to a widget with a given key | |
*/ | |
Future<void> _scrollToWidget(GlobalKey key) async { | |
final context = key.currentContext; | |
if (context != null) { | |
await Scrollable.ensureVisible( | |
context, | |
duration: Duration(milliseconds: 500), |