Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sloved Button Errors: customTextButtonColor Error, Animated Button11 … #259

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions lib/data/widget_category.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import 'package:flutter_component_ui/ui_components/paginations/paginations.dart'
import 'package:flutter_component_ui/ui_components/pricing_cards/pricing_cards.dart';
import 'package:flutter_component_ui/ui_components/segmented_controls/segmented_control_screen.dart';
import 'package:flutter_component_ui/ui_components/steppers/steppers.dart';


import '../ui_components/bottom_navbars/bottom_navbars.dart';
import '../ui_components/labels/lables.dart';
import '../ui_components/radios/radios.dart';
import '../ui_components/sliders/sliders.dart';
Expand Down
27 changes: 17 additions & 10 deletions lib/ui_components/buttons/all_buttons/animated_button/button11.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'package:flutter/material.dart';

class Button11 extends StatefulWidget {
final String title;

const Button11(this.title, {super.key});

@override
Expand All @@ -10,6 +11,7 @@ class Button11 extends StatefulWidget {

class _Button11State extends State<Button11> {
bool _isLoading = false;

@override
Widget build(BuildContext context) {
return ElevatedButton(
Expand All @@ -26,25 +28,30 @@ class _Button11State extends State<Button11> {
child: _isLoading
// ignore: sized_box_for_whitespace
? Container(
width: 200,
height: 60,
width: MediaQuery.of(context).size.width * 0.8,
height: MediaQuery.of(context).size.height * 0.07,
child: Row(
children: const [
CircularProgressIndicator(color: Colors.white),
SizedBox(width: 30),
Text('Please wait...',
mainAxisAlignment: MainAxisAlignment.center,
children: [
const CircularProgressIndicator(color: Colors.white),
SizedBox(width: MediaQuery.of(context).size.width * 0.03),
const Text('Please wait...',
style: TextStyle(
fontSize: 20,
overflow: TextOverflow.ellipsis,
// fontWeight: FontWeight.w600,
color: Color.fromARGB(255, 255, 255, 255)))
],
),
)
: Text(widget.title,
: Text(
widget.title,
style: const TextStyle(
fontSize: 20,
// fontWeight: FontWeight.w600,
color: Color.fromARGB(255, 255, 255, 255))),
fontSize: 20,
// fontWeight: FontWeight.w600,
color: Color.fromARGB(255, 255, 255, 255),
),
),
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Button12State extends State<Button12> {
duration: const Duration(milliseconds: 300),
curve: Curves.easeIn,
alignment: Alignment.center,
width: state == ButtonState.init ? width : 100,
width: state == ButtonState.init ? width : 200,
height: 70,
onEnd: () => setState(() => _isAnimating = !_isAnimating),
child: isStretched ? buildButton() : smallButton(isDone),
Expand All @@ -38,7 +38,7 @@ class Button12State extends State<Button12> {
},
style: ElevatedButton.styleFrom(
backgroundColor: const Color.fromARGB(255, 0, 194, 203),
fixedSize: const Size(100, 60),
fixedSize: const Size(200, 60),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(50))),
child: Text(widget.title,
Expand Down
2 changes: 2 additions & 0 deletions lib/ui_components/buttons/buttons.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ class _ButtonScreenState extends State<ButtonScreen> {
];
List<int> customTextButtonIndex = [9];

List<Color?> customTextButtonColor = [null];

final List<Widget> customAnimatedButton = [
const Button11("button"),
const Button12("button"),
Expand Down
37 changes: 18 additions & 19 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ packages:
dependency: transitive
description:
name: async
sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
url: "https://pub.dev"
source: hosted
version: "2.10.0"
version: "2.11.0"
boolean_selector:
dependency: transitive
description:
Expand All @@ -29,10 +29,10 @@ packages:
dependency: transitive
description:
name: characters
sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
url: "https://pub.dev"
source: hosted
version: "1.2.1"
version: "1.3.0"
clipboard:
dependency: "direct main"
description:
Expand All @@ -53,10 +53,10 @@ packages:
dependency: transitive
description:
name: collection
sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0
sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c"
url: "https://pub.dev"
source: hosted
version: "1.17.0"
version: "1.17.1"
crypto:
dependency: transitive
description:
Expand Down Expand Up @@ -148,11 +148,10 @@ packages:
dependency: "direct main"
description:
name: google_fonts
sha256: "927573f2e8a8d65c17931e21918ad0ab0666b1b636537de7c4932bdb487b190f"
sha256: "6b6f10f0ce3c42f6552d1c70d2c28d764cf22bb487f50f66cca31dcd5194f4d6"
url: "https://pub.dev"
source: hosted

version: "4.0.4"
version: "4.0.4"
hive:
dependency: "direct main"
description:
Expand Down Expand Up @@ -189,10 +188,10 @@ packages:
dependency: transitive
description:
name: js
sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7"
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
url: "https://pub.dev"
source: hosted
version: "0.6.5"
version: "0.6.7"
lints:
dependency: transitive
description:
Expand All @@ -205,10 +204,10 @@ packages:
dependency: transitive
description:
name: matcher
sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72"
sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb"
url: "https://pub.dev"
source: hosted
version: "0.12.13"
version: "0.12.15"
material_color_utilities:
dependency: transitive
description:
Expand All @@ -221,10 +220,10 @@ packages:
dependency: transitive
description:
name: meta
sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42"
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
url: "https://pub.dev"
source: hosted
version: "1.8.0"
version: "1.9.1"
nested:
dependency: transitive
description:
Expand All @@ -245,10 +244,10 @@ packages:
dependency: transitive
description:
name: path
sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
url: "https://pub.dev"
source: hosted
version: "1.8.2"
version: "1.8.3"
path_provider:
dependency: transitive
description:
Expand Down Expand Up @@ -378,10 +377,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206
sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb
url: "https://pub.dev"
source: hosted
version: "0.4.16"
version: "0.5.1"
typed_data:
dependency: transitive
description:
Expand Down