-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from deandreamatias/feature/home
Feature/home
- Loading branch information
Showing
65 changed files
with
1,301 additions
and
260 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains 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
This file contains 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
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
class Constants { | ||
static const String home = 'https://peluqueriacaninamimos.com/'; | ||
static const String phone = '+34666666666'; | ||
} |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,28 @@ | ||
import 'package:dog_gromming_website/ui/navigation/menu_navigation.dart'; | ||
import 'package:dog_gromming_website/ui/navigation/routes.dart'; | ||
import 'package:dog_gromming_website/ui/widgets/screens/announcement/announcement_screen.dart'; | ||
import 'package:dog_gromming_website/ui/widgets/screens/home/home_screen.dart'; | ||
import 'package:dog_gromming_website/ui/widgets/screens/splash/splash_screen.dart'; | ||
import 'package:flutter/widgets.dart'; | ||
import 'package:flutter_native_splash/flutter_native_splash.dart'; | ||
import 'package:go_router/go_router.dart'; | ||
|
||
final GlobalKey<NavigatorState> rootNavigatorKey = | ||
final GlobalKey<NavigatorState> _rootNavigatorKey = | ||
GlobalKey<NavigatorState>(debugLabel: 'root'); | ||
|
||
class MainNavigator { | ||
final GoRouter router = GoRouter( | ||
navigatorKey: rootNavigatorKey, | ||
initialLocation: Routes.splash, | ||
navigatorKey: _rootNavigatorKey, | ||
initialLocation: Routes.home, | ||
redirect: (context, state) { | ||
FlutterNativeSplash.remove(); | ||
return null; | ||
}, | ||
routes: <RouteBase>[ | ||
GoRoute( | ||
path: Routes.splash, | ||
builder: (BuildContext context, GoRouterState state) => | ||
const SplashScreen(), | ||
), | ||
GoRoute( | ||
path: Routes.home, | ||
builder: (BuildContext context, GoRouterState state) => HomeScreen(), | ||
), | ||
GoRoute( | ||
path: Routes.announcement, | ||
builder: (BuildContext context, GoRouterState state) => | ||
const AnnouncementScreen(), | ||
), | ||
menuNavigation, | ||
], | ||
); | ||
|
||
Future<void> navigateToSplash() { | ||
return router.push(Routes.splash); | ||
} | ||
|
||
Future<void> navigateToHome() { | ||
return router.push(Routes.home); | ||
} | ||
|
||
Future<void> navigateToAnnouncement() { | ||
return router.push(Routes.announcement); | ||
} | ||
|
||
void pop() { | ||
if (router.canPop()) router.pop(); | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import 'package:dog_gromming_website/ui/navigation/routes.dart'; | ||
import 'package:dog_gromming_website/ui/widgets/screens/home/home_screen.dart'; | ||
import 'package:dog_gromming_website/ui/widgets/screens/scaffold_with_nav_bar.dart'; | ||
import 'package:flutter/widgets.dart'; | ||
import 'package:go_router/go_router.dart'; | ||
|
||
final GlobalKey<NavigatorState> _menuNavigatorKey = | ||
GlobalKey<NavigatorState>(debugLabel: 'menu'); | ||
|
||
final menuNavigation = ShellRoute( | ||
navigatorKey: _menuNavigatorKey, | ||
builder: (BuildContext context, GoRouterState state, Widget child) { | ||
return ScaffoldWithNavBar(child: child); | ||
}, | ||
routes: <RouteBase>[ | ||
GoRoute( | ||
path: Routes.home, | ||
builder: (BuildContext context, GoRouterState state) { | ||
return const HomeScreen(); | ||
}, | ||
), | ||
GoRoute( | ||
path: Routes.services, | ||
builder: (BuildContext context, GoRouterState state) { | ||
return const Text('Services'); | ||
}, | ||
), | ||
GoRoute( | ||
path: Routes.gallery, | ||
builder: (BuildContext context, GoRouterState state) { | ||
return const Text('Gallery'); | ||
}, | ||
), | ||
GoRoute( | ||
path: Routes.about, | ||
builder: (BuildContext context, GoRouterState state) { | ||
return const Text('about'); | ||
}, | ||
), | ||
], | ||
); | ||
|
||
enum MenuNavigation { | ||
home, | ||
services, | ||
gallery, | ||
about, | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,24 @@ | ||
import 'package:dog_gromming_website/ui/navigation/menu_navigation.dart'; | ||
|
||
class Routes { | ||
static const String splash = '/'; | ||
static const String home = '/home'; | ||
static const String announcement = '/announcement'; | ||
static const String services = '/services'; | ||
static const String about = '/about'; | ||
static const String gallery = '/gallery'; | ||
} | ||
|
||
extension MenuRoutes on MenuNavigation { | ||
String get route { | ||
switch (this) { | ||
case MenuNavigation.home: | ||
return Routes.home; | ||
case MenuNavigation.services: | ||
return Routes.services; | ||
case MenuNavigation.gallery: | ||
return Routes.gallery; | ||
case MenuNavigation.about: | ||
return Routes.about; | ||
} | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import 'package:dog_gromming_website/ui/styles/app_colors.dart'; | ||
import 'package:flutter/cupertino.dart'; | ||
|
||
class BoxShadows { | ||
static final List<BoxShadow> bs1 = [ | ||
BoxShadow( | ||
color: AppColors.black.withOpacity(0.12), | ||
blurRadius: 12, | ||
offset: const Offset(2, 2), | ||
), | ||
]; | ||
} |
This file contains 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
This file contains 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
Oops, something went wrong.