Frontend first draft
This commit is contained in:
34
frontend/pweb/lib/app/app.dart
Normal file
34
frontend/pweb/lib/app/app.dart
Normal file
@@ -0,0 +1,34 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import 'package:pshared/config/constants.dart';
|
||||
import 'package:pshared/provider/locale.dart';
|
||||
|
||||
import 'package:pweb/app/router/router.dart';
|
||||
|
||||
import 'package:pshared/generated/i18n/ps_localizations.dart';
|
||||
import 'package:pweb/generated/i18n/app_localizations.dart';
|
||||
|
||||
|
||||
final _router = createRouter();
|
||||
|
||||
class PayApp extends StatelessWidget {
|
||||
const PayApp({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => MaterialApp.router(
|
||||
title: 'Profee Pay',
|
||||
theme: ThemeData(
|
||||
colorScheme: ColorScheme.fromSeed(seedColor: Constants.themeColor),
|
||||
useMaterial3: true,
|
||||
),
|
||||
routerConfig: _router,
|
||||
localizationsDelegates: [
|
||||
...PSLocalizations.localizationsDelegates,
|
||||
...AppLocalizations.localizationsDelegates,
|
||||
],
|
||||
supportedLocales: AppLocalizations.supportedLocales,
|
||||
locale: context.watch<LocaleProvider>().locale,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user