First designs for ui
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
// needed for web horizontal scroll behavior
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:fotodocumentation/main.dart';
|
||||
import 'package:fotodocumentation/pages/customer/customer_list_widget.dart';
|
||||
import 'package:fotodocumentation/pages/customer/customer_widget.dart';
|
||||
import 'package:fotodocumentation/pages/customer/picture_widget.dart';
|
||||
import 'package:fotodocumentation/pages/login/login_widget.dart';
|
||||
import 'package:fotodocumentation/utils/di_container.dart';
|
||||
import 'package:fotodocumentation/utils/login_credentials.dart';
|
||||
@@ -14,6 +16,8 @@ class GlobalRouter {
|
||||
static final GlobalKey<NavigatorState> skillEditorNavigatorKey = GlobalKey<NavigatorState>(debugLabel: 'skillEditor');
|
||||
|
||||
static final String pathHome = "/home";
|
||||
static final String pathCustomer = "/customer";
|
||||
static final String pathPicture = "/picture";
|
||||
static final String pathLogin = "/login";
|
||||
|
||||
static final GoRouter router = createRouter(pathHome);
|
||||
@@ -33,7 +37,23 @@ class GlobalRouter {
|
||||
),
|
||||
GoRoute(
|
||||
path: pathHome,
|
||||
builder: (context, state) => CustomerWidget(),
|
||||
builder: (context, state) => CustomerListWidget(),
|
||||
),
|
||||
GoRoute(
|
||||
path: "$pathCustomer/:id",
|
||||
builder: (context, state) {
|
||||
var idStr = state.pathParameters['id'];
|
||||
var id = idStr == null ? null : int.tryParse(idStr);
|
||||
return CustomerWidget(customerId: id ?? -1);
|
||||
},
|
||||
),
|
||||
GoRoute(
|
||||
path: "$pathPicture/:id",
|
||||
builder: (context, state) {
|
||||
var idStr = state.pathParameters['id'];
|
||||
var id = idStr == null ? null : int.tryParse(idStr);
|
||||
return PictureWidget(id: id ?? -1);
|
||||
},
|
||||
),
|
||||
],
|
||||
redirect: (context, state) {
|
||||
|
||||
Reference in New Issue
Block a user