master #81
@ -1,16 +1,9 @@
|
|||||||
# example
|
# Wyatt UIKIt Example
|
||||||
|
|
||||||
A new Flutter project.
|
You can force the launch page. (For debug purposes).
|
||||||
|
|
||||||
## Getting Started
|
```shell
|
||||||
|
flutter run -d macos --dart-define PAGE=1
|
||||||
|
```
|
||||||
|
|
||||||
This project is a starting point for a Flutter application.
|
> This will forces button page.
|
||||||
|
|
||||||
A few resources to get you started if this is your first Flutter project:
|
|
||||||
|
|
||||||
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
|
|
||||||
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
|
|
||||||
|
|
||||||
For help getting started with Flutter development, view the
|
|
||||||
[online documentation](https://docs.flutter.dev/), which offers tutorials,
|
|
||||||
samples, guidance on mobile development, and a full API reference.
|
|
@ -36,14 +36,18 @@ class Buttons extends StatelessWidget {
|
|||||||
const Buttons({super.key});
|
const Buttons({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) => Column(
|
Widget build(BuildContext context) => ListView(
|
||||||
children: [
|
children: [
|
||||||
Text(
|
const Gap(20),
|
||||||
|
Align(
|
||||||
|
child: Text(
|
||||||
'Buttons',
|
'Buttons',
|
||||||
style: Theme.of(context).textTheme.titleLarge,
|
style: Theme.of(context).textTheme.titleLarge,
|
||||||
),
|
),
|
||||||
|
),
|
||||||
const Gap(20),
|
const Gap(20),
|
||||||
FlatButton(
|
Center(
|
||||||
|
child: FlatButton(
|
||||||
label: const TextWrapper('Voir notre savoir faire'),
|
label: const TextWrapper('Voir notre savoir faire'),
|
||||||
normalStyle: const FlatButtonStyle(
|
normalStyle: const FlatButtonStyle(
|
||||||
foregroundColors: MultiColor(_colors),
|
foregroundColors: MultiColor(_colors),
|
||||||
@ -70,6 +74,7 @@ class Buttons extends StatelessWidget {
|
|||||||
Icons.arrow_forward_rounded,
|
Icons.arrow_forward_rounded,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
const Gap(20),
|
const Gap(20),
|
||||||
FlatButton(
|
FlatButton(
|
||||||
label: TextWrapper(
|
label: TextWrapper(
|
||||||
|
@ -9,12 +9,15 @@ class Cards extends StatelessWidget {
|
|||||||
const Cards({super.key});
|
const Cards({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) => Column(
|
Widget build(BuildContext context) => ListView(
|
||||||
children: [
|
children: [
|
||||||
Text(
|
const Gap(20),
|
||||||
|
Align(
|
||||||
|
child: Text(
|
||||||
'Cards',
|
'Cards',
|
||||||
style: Theme.of(context).textTheme.titleLarge,
|
style: Theme.of(context).textTheme.titleLarge,
|
||||||
),
|
),
|
||||||
|
),
|
||||||
const Gap(20),
|
const Gap(20),
|
||||||
const InformationCards(),
|
const InformationCards(),
|
||||||
const Gap(20),
|
const Gap(20),
|
||||||
|
@ -1,20 +1,61 @@
|
|||||||
import 'package:adaptive_theme/adaptive_theme.dart';
|
import 'package:adaptive_theme/adaptive_theme.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:wyatt_ui_kit_example/buttons/buttons.dart';
|
||||||
import 'package:wyatt_ui_kit_example/cards/cards.dart';
|
import 'package:wyatt_ui_kit_example/cards/cards.dart';
|
||||||
|
|
||||||
const String title = 'Wyatt Ui Kit Example';
|
const String title = 'Wyatt UIKit Example';
|
||||||
|
|
||||||
class Home extends StatefulWidget {
|
class Home extends StatefulWidget {
|
||||||
const Home({super.key});
|
const Home({super.key, this.forceIndex = 0});
|
||||||
|
|
||||||
|
final int forceIndex;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<Home> createState() => _HomeState();
|
State<Home> createState() => _HomeState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _HomeState extends State<Home> {
|
class _HomeState extends State<Home> {
|
||||||
|
final List<Widget> pages = const [Cards(), Buttons()];
|
||||||
|
|
||||||
|
int currentIndex = 0;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
currentIndex = widget.forceIndex;
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) => Scaffold(
|
Widget build(BuildContext context) => Scaffold(
|
||||||
drawer: const Drawer(),
|
drawer: Drawer(
|
||||||
|
child: ListView(
|
||||||
|
padding: EdgeInsets.zero,
|
||||||
|
children: [
|
||||||
|
ListTile(
|
||||||
|
title: const Text('Cards'),
|
||||||
|
onTap: () {
|
||||||
|
if (currentIndex != 0) {
|
||||||
|
setState(() {
|
||||||
|
currentIndex = 0;
|
||||||
|
});
|
||||||
|
Navigator.pop(context);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
ListTile(
|
||||||
|
title: const Text('Buttons'),
|
||||||
|
onTap: () {
|
||||||
|
if (currentIndex != 1) {
|
||||||
|
setState(() {
|
||||||
|
currentIndex = 1;
|
||||||
|
});
|
||||||
|
Navigator.pop(context);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: const Text(title),
|
title: const Text(title),
|
||||||
actions: [
|
actions: [
|
||||||
@ -30,10 +71,7 @@ class _HomeState extends State<Home> {
|
|||||||
),
|
),
|
||||||
body: Padding(
|
body: Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||||
child: ListView(
|
child: pages[currentIndex],
|
||||||
shrinkWrap: true,
|
|
||||||
children: const [Cards()],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -22,13 +22,16 @@ import 'package:wyatt_ui_kit_example/home.dart';
|
|||||||
import 'package:wyatt_ui_kit_example/theme_extension.dart';
|
import 'package:wyatt_ui_kit_example/theme_extension.dart';
|
||||||
|
|
||||||
void main(List<String> args) {
|
void main(List<String> args) {
|
||||||
runApp(const App());
|
const forcePage = int.fromEnvironment('PAGE');
|
||||||
|
runApp(const App(
|
||||||
|
defaultPage: forcePage,
|
||||||
|
),);
|
||||||
}
|
}
|
||||||
|
|
||||||
class App extends StatelessWidget {
|
class App extends StatelessWidget {
|
||||||
const App({super.key});
|
const App({required this.defaultPage, super.key});
|
||||||
|
|
||||||
static const String title = 'Wyatt Ui Kit Example';
|
final int defaultPage;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) => AdaptiveTheme(
|
Widget build(BuildContext context) => AdaptiveTheme(
|
||||||
@ -125,7 +128,9 @@ class App extends StatelessWidget {
|
|||||||
Locale('fr', ''),
|
Locale('fr', ''),
|
||||||
],
|
],
|
||||||
title: title,
|
title: title,
|
||||||
home: const Home(),
|
home: Home(
|
||||||
|
forceIndex: defaultPage,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -3,20 +3,27 @@ PODS:
|
|||||||
- path_provider_foundation (0.0.1):
|
- path_provider_foundation (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
|
- shared_preferences_foundation (0.0.1):
|
||||||
|
- Flutter
|
||||||
|
- FlutterMacOS
|
||||||
|
|
||||||
DEPENDENCIES:
|
DEPENDENCIES:
|
||||||
- FlutterMacOS (from `Flutter/ephemeral`)
|
- FlutterMacOS (from `Flutter/ephemeral`)
|
||||||
- path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/macos`)
|
- path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/macos`)
|
||||||
|
- shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/macos`)
|
||||||
|
|
||||||
EXTERNAL SOURCES:
|
EXTERNAL SOURCES:
|
||||||
FlutterMacOS:
|
FlutterMacOS:
|
||||||
:path: Flutter/ephemeral
|
:path: Flutter/ephemeral
|
||||||
path_provider_foundation:
|
path_provider_foundation:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/macos
|
||||||
|
shared_preferences_foundation:
|
||||||
|
:path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/macos
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
|
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
|
||||||
path_provider_foundation: 37748e03f12783f9de2cb2c4eadfaa25fe6d4852
|
path_provider_foundation: 37748e03f12783f9de2cb2c4eadfaa25fe6d4852
|
||||||
|
shared_preferences_foundation: 297b3ebca31b34ec92be11acd7fb0ba932c822ca
|
||||||
|
|
||||||
PODFILE CHECKSUM: 353c8bcc5d5b0994e508d035b5431cfe18c1dea7
|
PODFILE CHECKSUM: 353c8bcc5d5b0994e508d035b5431cfe18c1dea7
|
||||||
|
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>com.apple.security.app-sandbox</key>
|
<key>com.apple.security.app-sandbox</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>com.apple.security.cs.allow-jit</key>
|
<key>com.apple.security.cs.allow-jit</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>com.apple.security.network.server</key>
|
<key>com.apple.security.network.server</key>
|
||||||
<true/>
|
<true/>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
|
<key>com.apple.security.network.client</key>
|
||||||
|
<true/>
|
||||||
<key>com.apple.security.app-sandbox</key>
|
<key>com.apple.security.app-sandbox</key>
|
||||||
<true/>
|
<true/>
|
||||||
</dict>
|
</dict>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user