|
| 1 | +import 'package:flutter/material.dart'; |
| 2 | +import 'package:gap/gap.dart'; |
| 3 | +import 'package:notely/utils/colors.dart'; |
| 4 | +import 'package:notely/utils/fonts.dart'; |
| 5 | +import 'package:notely/widgets/common/appbarsCommon.dart'; |
| 6 | +import 'package:notely/widgets/onboarding/onboardingButton.dart'; |
| 7 | + |
| 8 | +class NoContentHomePage extends StatelessWidget { |
| 9 | + const NoContentHomePage({super.key}); |
| 10 | + |
| 11 | + @override |
| 12 | + Widget build(BuildContext context) { |
| 13 | + return SafeArea( |
| 14 | + child: Scaffold( |
| 15 | + appBar: PreferredSize( |
| 16 | + preferredSize: Size.fromHeight(64.0), |
| 17 | + child: AppBarCommon( |
| 18 | + // TODO change to drawer |
| 19 | + leadingIcon: IconButton( |
| 20 | + icon: Icon( |
| 21 | + Icons.menu, |
| 22 | + color: Colors.black, |
| 23 | + ), |
| 24 | + onPressed: () => Scaffold.of(context).openDrawer(), |
| 25 | + ), |
| 26 | + title: "All Notes", |
| 27 | + actionIcon: Icon( |
| 28 | + Icons.search, |
| 29 | + color: Colors.black, |
| 30 | + ), |
| 31 | + ), |
| 32 | + ), |
| 33 | + backgroundColor: ColorsConstant.backgroundColor, |
| 34 | + body: Padding( |
| 35 | + padding: const EdgeInsets.symmetric(horizontal: 44.0), |
| 36 | + child: SingleChildScrollView( |
| 37 | + child: Column( |
| 38 | + children: [ |
| 39 | + Gap(100), |
| 40 | + Image.asset("assets/images/homepage/no-content-homepage.png"), |
| 41 | + Gap(40), |
| 42 | + Text( |
| 43 | + "Create your first note", |
| 44 | + style: Fonts.onboardingTitle.bodyLarge, |
| 45 | + ), |
| 46 | + Gap(12), |
| 47 | + Text( |
| 48 | + "Add a note about anything (your thoughts on climate change, or your history essay) and share it witht the world.", |
| 49 | + style: Fonts.onboardingTitle.bodyMedium, |
| 50 | + textAlign: TextAlign.center, |
| 51 | + ), |
| 52 | + const Gap(78), |
| 53 | + OnboardingButton( |
| 54 | + title: "Create a note", |
| 55 | + moveTo: "/create-note", |
| 56 | + ), |
| 57 | + const Gap(20), |
| 58 | + GestureDetector( |
| 59 | + onTap: () {}, |
| 60 | + child: Text( |
| 61 | + "Import Notes", |
| 62 | + style: Fonts.onboardingLinks.bodyMedium, |
| 63 | + textAlign: TextAlign.center, |
| 64 | + ), |
| 65 | + ), |
| 66 | + ], |
| 67 | + ), |
| 68 | + ), |
| 69 | + ), |
| 70 | + ), |
| 71 | + ); |
| 72 | + } |
| 73 | +} |
0 commit comments