feat(ui_kit): implement flat/outlined button

This commit is contained in:
2023-02-14 11:55:34 +01:00
parent 07572aeca2
commit 60126fffc4
7 changed files with 244 additions and 71 deletions
@@ -1,24 +1,28 @@
// Copyright (C) 2023 WYATT GROUP
// Please see the AUTHORS file for details.
//
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// any later version.
//
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
import 'package:flutter/material.dart';
import 'package:flutter/material.dart' hide OutlinedButton;
import 'package:gap/gap.dart';
import 'package:wyatt_ui_components/wyatt_wyatt_ui_components.dart';
import 'package:wyatt_ui_kit/wyatt_ui_kit.dart';
const _color1 = Color(0xFF3C97FB);
const _color2 = Color(0xFF446DF4);
const _colors = [_color1, _color2];
class Buttons extends StatelessWidget {
const Buttons({super.key});
@@ -27,13 +31,42 @@ class Buttons extends StatelessWidget {
children: [
Text(
'Buttons',
style: Theme.of(context)
.textTheme
.titleLarge,
style: Theme.of(context).textTheme.titleLarge,
),
const Gap(20),
const FlatButton(
label: TextWrapper('text'),
const OutlinedButton(
label: TextWrapper('Voir notre savoir faire', gradient: _colors),
style: OutlinedButtonStyle(
borderColors: _colors,
stroke: 3,
),
prefix: Icon(
Icons.arrow_forward_rounded,
color: _color1,
),
suffix: Icon(
Icons.arrow_forward_rounded,
color: _color2,
),
),
const Gap(20),
FlatButton(
label: TextWrapper(
'Voir notre savoir faire',
style:
context.textTheme.titleLarge?.copyWith(color: Colors.white),
),
style: const FlatButtonStyle(
borderColors: _colors,
),
prefix: const Icon(
Icons.arrow_forward_rounded,
color: Colors.white,
),
suffix: const Icon(
Icons.arrow_forward_rounded,
color: Colors.white,
),
),
],
);