https://github.com/jtans/zf_flutter_kit
A flutter suite library containing common components(button,text,dialog,slider,route page etc.) for easy use.
https://github.com/jtans/zf_flutter_kit
button components dialog flutter flutter-ui-kit navigator route text ui uikit
Last synced: 4 months ago
JSON representation
A flutter suite library containing common components(button,text,dialog,slider,route page etc.) for easy use.
- Host: GitHub
- URL: https://github.com/jtans/zf_flutter_kit
- Owner: jtans
- License: other
- Created: 2020-03-31T03:01:40.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-01T10:16:48.000Z (about 6 years ago)
- Last Synced: 2025-10-23T00:28:03.376Z (8 months ago)
- Topics: button, components, dialog, flutter, flutter-ui-kit, navigator, route, text, ui, uikit
- Language: Dart
- Homepage:
- Size: 879 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# zf_flutter_kit
A flutter suite library containing common components(button,text,dialog,slider,route page etc.) for easy use.
# Instructions for use
For more,see example project.
# Installing
Use this package as a library
1. Depend on it
Add this to your package's pubspec.yaml file:
```yaml
dependencies:
zf_flutter_kit: ^0.0.2
```
2. Install it
You can install packages from the command line:
with Flutter:
```yaml
flutter pub get
```
Alternatively, your editor might support ```flutter pub get```. Check the docs for your editor to learn more.
3. Import it
Now in your Dart code, you can use:
```dart
import 'package:zf_flutter_kit/zf_flutter_kit.dart';
```
# Screenshot
## Widget
### ZFButton
```dart
ZFButton(
{this.text = '',
this.onPressed,
this.borderRadius = 8,
this.borderWidth = 1,
this.color = Colors.white,
this.highlightColor = _highlightColor,
this.textColor = _color,
this.highlightTextColor = Colors.white,
this.borderColor = _color,
this.highlightBorderColor = _highlightColor,
this.textStyle,
this.selected = false,
});
```
### Text、BaseWidget(a simple PageRoute)、Scrollview、slider etc.

## Dialog
```dart
ZFAlertDialog.show(context, 'Your Title', 'Your Message',
onOkPressed: () {
return true; //return true to close, when press ok button
});
```

## custom dialog
```dart
ZFAlertDialog.show(context, 'Your Title', 'Your Message',
onOkPressed: () {
return true;
}, footerContent: () {
return Container(
color: Colors.red,
width: 200,
height: 44,
);
}());
```

## custom dialog content
```dart
showDialog(
context: context,
builder: (ctx) {
return ZFDialog(
cancelText: 'Cancel',
okText: 'Ok',
content: () {
return Image.network(
'https://www.baidu.com/img/bd_logo1.png');
}(),
);
});
```

## Navigator
```dart
//push open a page
Navigator.of(context).zfpush(MinePage());
//push open a webview page
Navigator.of(context)
.zfopenWebView('https://github.com', 'Your web page title');
```
