fix intro page buug
This commit is contained in:
@@ -20,23 +20,19 @@ import 'package:timezone_to_country/timezone_to_country.dart';
|
|||||||
class IntroPage extends HookConsumerWidget with PresLogger {
|
class IntroPage extends HookConsumerWidget with PresLogger {
|
||||||
IntroPage({super.key});
|
IntroPage({super.key});
|
||||||
|
|
||||||
final locationInfoLoaded = useState(false);
|
bool locationInfoLoaded = false;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
final t = ref.watch(translationsProvider);
|
final t = ref.watch(translationsProvider);
|
||||||
|
|
||||||
final isStarting = useState(false);
|
final isStarting = useState(false);
|
||||||
useEffect(
|
|
||||||
() {
|
if (!locationInfoLoaded) {
|
||||||
if (!locationInfoLoaded.value) {
|
autoSelectRegion(ref).then((value) => loggy.debug("Auto Region selection finished!"));
|
||||||
autoSelectRegion(ref).then((value) => loggy.debug("Auto Region selection finished!"));
|
locationInfoLoaded = true;
|
||||||
locationInfoLoaded.value = true;
|
}
|
||||||
}
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
[],
|
|
||||||
);
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: CustomScrollView(
|
child: CustomScrollView(
|
||||||
|
|||||||
Reference in New Issue
Block a user