Skip to content

Commit ce7e8df

Browse files
committed
added custom placeholder
1 parent 7fe2ef9 commit ce7e8df

File tree

2 files changed

+45
-1
lines changed

2 files changed

+45
-1
lines changed

lib/main.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import 'package:taskwarrior/controller/onboarding_controller.dart';
1414
import 'package:taskwarrior/routes/pageroute.dart';
1515
import 'package:taskwarrior/views/Onboarding/onboarding_screen.dart';
1616
import 'package:taskwarrior/views/profile/profile.dart';
17+
import 'package:taskwarrior/widgets/app_placeholder.dart';
1718
import 'package:uuid/uuid.dart';
1819

1920
import 'package:taskwarrior/services/notification_services.dart';
@@ -54,7 +55,7 @@ Future main([List<String> args = const []]) async {
5455
baseDirectory: testingDirectory ?? snapshot.data!,
5556
child: const MyApp(),
5657
)
57-
: const Placeholder(),
58+
: const AppSetupPlaceholder(),
5859
),
5960
);
6061
}

lib/widgets/app_placeholder.dart

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import 'package:flutter/material.dart';
2+
import 'package:flutter_svg/flutter_svg.dart';
3+
import 'package:google_fonts/google_fonts.dart';
4+
import 'package:taskwarrior/config/app_settings.dart';
5+
import 'package:taskwarrior/widgets/pallete.dart';
6+
7+
class AppSetupPlaceholder extends StatelessWidget {
8+
const AppSetupPlaceholder({Key? key}) : super(key: key);
9+
10+
@override
11+
Widget build(BuildContext context) {
12+
return MaterialApp(
13+
home: Scaffold(
14+
backgroundColor:
15+
AppSettings.isDarkMode ? Palette.kToDark.shade200 : Colors.white,
16+
body: Center(
17+
child: Column(
18+
mainAxisAlignment: MainAxisAlignment.center,
19+
children: [
20+
SizedBox(
21+
child: SvgPicture.asset(
22+
"assets/svg/logo.svg",
23+
height: 100,
24+
width: double.infinity,
25+
)),
26+
const SizedBox(height: 30.0),
27+
const CircularProgressIndicator(),
28+
const SizedBox(height: 16.0),
29+
Text(
30+
"Setting up the app...",
31+
style: GoogleFonts.poppins(
32+
fontWeight: FontWeight.bold,
33+
fontSize: 18,
34+
color: AppSettings.isDarkMode ? Colors.white : Colors.black,
35+
),
36+
),
37+
],
38+
),
39+
),
40+
),
41+
);
42+
}
43+
}

0 commit comments

Comments
 (0)