Compare commits
No commits in common. "c942e2aacf8742759cb8e2d213f2f6efe45c5c87" and "4695cf06188b18fd686e6bdd5c4b6a68f60db495" have entirely different histories.
c942e2aacf
...
4695cf0618
@ -1,9 +1,16 @@
|
|||||||
# Wyatt UIKIt Example
|
# example
|
||||||
|
|
||||||
You can force the launch page. (For debug purposes).
|
A new Flutter project.
|
||||||
|
|
||||||
```shell
|
## Getting Started
|
||||||
flutter run -d macos --dart-define PAGE=1
|
|
||||||
```
|
|
||||||
|
|
||||||
> This will forces button page.
|
This project is a starting point for a Flutter application.
|
||||||
|
|
||||||
|
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,43 +36,38 @@ class Buttons extends StatelessWidget {
|
|||||||
const Buttons({super.key});
|
const Buttons({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) => ListView(
|
Widget build(BuildContext context) => Column(
|
||||||
children: [
|
children: [
|
||||||
const Gap(20),
|
Text(
|
||||||
Align(
|
'Buttons',
|
||||||
child: Text(
|
style: Theme.of(context).textTheme.titleLarge,
|
||||||
'Buttons',
|
|
||||||
style: Theme.of(context).textTheme.titleLarge,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
const Gap(20),
|
const Gap(20),
|
||||||
Center(
|
FlatButton(
|
||||||
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),
|
backgroundColors: MultiColor.single(Colors.transparent),
|
||||||
backgroundColors: MultiColor.single(Colors.transparent),
|
borderColors: MultiColor(_colors),
|
||||||
borderColors: MultiColor(_colors),
|
stroke: 3,
|
||||||
stroke: 3,
|
),
|
||||||
),
|
hoveredStyle: const FlatButtonStyle(
|
||||||
hoveredStyle: const FlatButtonStyle(
|
foregroundColors: MultiColor.single(Colors.white),
|
||||||
foregroundColors: MultiColor.single(Colors.white),
|
backgroundColors: MultiColor(_colors),
|
||||||
backgroundColors: MultiColor(_colors),
|
borderColors: MultiColor(_colors),
|
||||||
borderColors: MultiColor(_colors),
|
stroke: 3,
|
||||||
stroke: 3,
|
),
|
||||||
),
|
tappedStyle: const FlatButtonStyle(
|
||||||
tappedStyle: const FlatButtonStyle(
|
foregroundColors: MultiColor.single(Colors.white),
|
||||||
foregroundColors: MultiColor.single(Colors.white),
|
backgroundColors: MultiColor(_colorsDarken),
|
||||||
backgroundColors: MultiColor(_colorsDarken),
|
borderColors: MultiColor(_colorsDarken),
|
||||||
borderColors: MultiColor(_colorsDarken),
|
stroke: 3,
|
||||||
stroke: 3,
|
),
|
||||||
),
|
prefix: const Icon(
|
||||||
prefix: const Icon(
|
Icons.arrow_forward_rounded,
|
||||||
Icons.arrow_forward_rounded,
|
),
|
||||||
),
|
suffix: const Icon(
|
||||||
suffix: const Icon(
|
Icons.arrow_forward_rounded,
|
||||||
Icons.arrow_forward_rounded,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const Gap(20),
|
const Gap(20),
|
||||||
|
@ -9,14 +9,11 @@ class Cards extends StatelessWidget {
|
|||||||
const Cards({super.key});
|
const Cards({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) => ListView(
|
Widget build(BuildContext context) => Column(
|
||||||
children: [
|
children: [
|
||||||
const Gap(20),
|
Text(
|
||||||
Align(
|
'Cards',
|
||||||
child: Text(
|
style: Theme.of(context).textTheme.titleLarge,
|
||||||
'Cards',
|
|
||||||
style: Theme.of(context).textTheme.titleLarge,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
const Gap(20),
|
const Gap(20),
|
||||||
const InformationCards(),
|
const InformationCards(),
|
||||||
|
@ -1,61 +1,20 @@
|
|||||||
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 UIKit Example';
|
const String title = 'Wyatt Ui Kit Example';
|
||||||
|
|
||||||
class Home extends StatefulWidget {
|
class Home extends StatefulWidget {
|
||||||
const Home({super.key, this.forceIndex = 0});
|
const Home({super.key});
|
||||||
|
|
||||||
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: Drawer(
|
drawer: const 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: [
|
||||||
@ -71,7 +30,10 @@ class _HomeState extends State<Home> {
|
|||||||
),
|
),
|
||||||
body: Padding(
|
body: Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||||
child: pages[currentIndex],
|
child: ListView(
|
||||||
|
shrinkWrap: true,
|
||||||
|
children: const [Cards()],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -22,16 +22,13 @@ 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) {
|
||||||
const forcePage = int.fromEnvironment('PAGE');
|
runApp(const App());
|
||||||
runApp(const App(
|
|
||||||
defaultPage: forcePage,
|
|
||||||
),);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class App extends StatelessWidget {
|
class App extends StatelessWidget {
|
||||||
const App({required this.defaultPage, super.key});
|
const App({super.key});
|
||||||
|
|
||||||
final int defaultPage;
|
static const String title = 'Wyatt Ui Kit Example';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) => AdaptiveTheme(
|
Widget build(BuildContext context) => AdaptiveTheme(
|
||||||
@ -128,9 +125,7 @@ class App extends StatelessWidget {
|
|||||||
Locale('fr', ''),
|
Locale('fr', ''),
|
||||||
],
|
],
|
||||||
title: title,
|
title: title,
|
||||||
home: Home(
|
home: const Home(),
|
||||||
forceIndex: defaultPage,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -3,27 +3,20 @@ 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,8 +2,6 @@
|
|||||||
<!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>
|
||||||
|
@ -15,12 +15,8 @@
|
|||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:wyatt_ui_components/wyatt_wyatt_ui_components.dart';
|
|
||||||
|
|
||||||
class LinearGradientHelper {
|
class LinearGradientHelper {
|
||||||
static LinearGradient? fromNullableColors(List<Color>? colors) =>
|
static LinearGradient? fromNullableColors(List<Color>? colors) =>
|
||||||
colors != null ? LinearGradient(colors: colors) : null;
|
colors != null ? LinearGradient(colors: colors) : null;
|
||||||
|
|
||||||
static LinearGradient? fromMultiColor(MultiColor multiColor) =>
|
|
||||||
multiColor.isGradient ? LinearGradient(colors: multiColor.colors) : null;
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user