Skip to content

Commit 4bd1e85

Browse files
Buttons
1 parent 0663e59 commit 4bd1e85

File tree

5 files changed

+156
-5
lines changed

5 files changed

+156
-5
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
## 0.0.1
1+
## 0.0.10
22

33
* TODO: Describe initial release.

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
<img src="https://raw.githubusercontent.com/adelbograyn/tatweerui-vue/main/public/tatweer.png"
44
alt="Markdown Monster icon"
5-
style="float: left; margin-right: 10px;" />
5+
style="float: left; margin-right: 10px; width: 100px; height: auto;" />
6+
67

78

89
`tatweerui` is a Flutter package that provides a collection of custom UI components for building Flutter applications. This package includes custom buttons, switches, list sections, list tiles, base dialogs, and info dialogs.

lib/buttons/primary_button.dart

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
import 'package:flutter/material.dart';
2+
3+
class TatweerPrimaryButton extends StatefulWidget {
4+
final double borderRadius;
5+
final Color buttonColor;
6+
final IconData customIcon;
7+
final double elevation;
8+
final double height;
9+
final Color iconColor;
10+
final double iconSize;
11+
final Color imageBackgroundColor;
12+
final EdgeInsetsGeometry imageMargin;
13+
final EdgeInsetsGeometry imagePadding;
14+
final double iconLeftPadding;
15+
final double iconTopPadding;
16+
final double imageSize;
17+
final bool mini;
18+
final bool small;
19+
final Function()? onPressed;
20+
final AssetImage setAssetImage;
21+
final Color splashColor;
22+
final String text;
23+
final Color textColor;
24+
final double textSize;
25+
final bool useGoogleImage;
26+
final bool useGradient;
27+
final bool showText;
28+
final Gradient setGradient;
29+
final double width;
30+
31+
const TatweerPrimaryButton(
32+
{Key? key,
33+
required this.borderRadius,
34+
required this.buttonColor,
35+
required this.customIcon,
36+
required this.elevation,
37+
required this.height,
38+
required this.iconColor,
39+
required this.iconSize,
40+
required this.imageBackgroundColor,
41+
required this.imageMargin,
42+
required this.imagePadding,
43+
required this.iconLeftPadding,
44+
required this.iconTopPadding,
45+
required this.imageSize,
46+
required this.mini,
47+
required this.small,
48+
this.onPressed,
49+
required this.setAssetImage,
50+
required this.splashColor,
51+
required this.text,
52+
required this.textColor,
53+
required this.textSize,
54+
required this.useGoogleImage,
55+
required this.useGradient,
56+
required this.showText,
57+
required this.setGradient,
58+
required this.width})
59+
: super(key: key);
60+
61+
@override
62+
State<TatweerPrimaryButton> createState() => _TatweerPrimaryButtonState();
63+
}
64+
65+
class _TatweerPrimaryButtonState extends State<TatweerPrimaryButton> {
66+
@override
67+
Widget build(BuildContext context) {
68+
return ElevatedButton(
69+
onPressed: widget.onPressed ?? () {},
70+
child: Container(),
71+
);
72+
}
73+
}

lib/buttons/secondary_button.dart

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
import 'package:flutter/material.dart';
2+
3+
class TatweerSecondaryButton extends StatefulWidget {
4+
final double borderRadius;
5+
final Color buttonColor;
6+
final IconData customIcon;
7+
final double elevation;
8+
final double height;
9+
final Color iconColor;
10+
final double iconSize;
11+
final Color imageBackgroundColor;
12+
final EdgeInsetsGeometry imageMargin;
13+
final EdgeInsetsGeometry imagePadding;
14+
final double iconLeftPadding;
15+
final double iconTopPadding;
16+
final double imageSize;
17+
final bool mini;
18+
final bool small;
19+
final Function()? onPressed;
20+
final AssetImage setAssetImage;
21+
final Color splashColor;
22+
final String text;
23+
final Color textColor;
24+
final double textSize;
25+
final bool useGoogleImage;
26+
final bool useGradient;
27+
final bool showText;
28+
final Gradient setGradient;
29+
final double width;
30+
31+
const TatweerSecondaryButton(
32+
{Key? key,
33+
required this.borderRadius,
34+
required this.buttonColor,
35+
required this.customIcon,
36+
required this.elevation,
37+
required this.height,
38+
required this.iconColor,
39+
required this.iconSize,
40+
required this.imageBackgroundColor,
41+
required this.imageMargin,
42+
required this.imagePadding,
43+
required this.iconLeftPadding,
44+
required this.iconTopPadding,
45+
required this.imageSize,
46+
required this.mini,
47+
required this.small,
48+
this.onPressed,
49+
required this.setAssetImage,
50+
required this.splashColor,
51+
required this.text,
52+
required this.textColor,
53+
required this.textSize,
54+
required this.useGoogleImage,
55+
required this.useGradient,
56+
required this.showText,
57+
required this.setGradient,
58+
required this.width})
59+
: super(key: key);
60+
61+
@override
62+
State<TatweerSecondaryButton> createState() => _TatweerSecondaryButtonState();
63+
}
64+
65+
class _TatweerSecondaryButtonState extends State<TatweerSecondaryButton> {
66+
@override
67+
Widget build(BuildContext context) {
68+
return ElevatedButton(
69+
onPressed: widget.onPressed ?? () {},
70+
child: Container(),
71+
);
72+
}
73+
}

pubspec.yaml

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
name: tatweerui
22
description: "A UI library for Flutter providing custom buttons, switches, dialogs, and more."
33
version: 0.0.10
4-
homepage:
4+
homepage: https://tatweerresearch.org
5+
repository: https://github.com/mohammednAlogly/tatweerui-flutter
6+
57

68
environment:
7-
sdk: '>=2.12.0 <3.0.0'
8-
flutter: ">=2.0.0 <3.0.0"
9+
sdk: '>=2.12.0 <4.0.0'
10+
flutter: ">=2.12.0"
911

1012
dependencies:
1113
flutter:
@@ -25,13 +27,15 @@ flutter:
2527
platforms:
2628
ios:
2729
pluginClass: TatweeruiPlugin
30+
sharedDarwinSource: true
2831
android:
2932
package: com.tatweer.ui
3033
pluginClass: HelloPlugin
3134
linux:
3235
pluginClass: TatweeruiPlugin
3336
macos:
3437
pluginClass: TatweeruiPlugin
38+
sharedDarwinSource: true
3539
windows:
3640
pluginClass: TatweeruiPlugin
3741
web:

0 commit comments

Comments
 (0)