All Projects → gaoyong06 → gleam

gaoyong06 / gleam

Licence: MIT license
一个简单、轻量、可靠的Flutter UI 组件库

Programming Languages

dart
5743 projects

Projects that are alternatives of or similar to gleam

oneroof
Learn about firebase crud operation authentication, animation
Stars: ✭ 15 (-37.5%)
Mutual labels:  flutter-demo, flutter-examples, flutter-app
BloodMS
🔥 🔥 🔥 A blood management project. 🔥 🔥 🔥
Stars: ✭ 48 (+100%)
Mutual labels:  flutter-demo, flutter-examples, flutter-app
addIt
Simple addition game made with Flutter for Mobile and Web using BLOC pattern
Stars: ✭ 16 (-33.33%)
Mutual labels:  flutter-demo, flutter-examples, flutter-app
DevQuiz
Dev.Quiz 👨‍💻 | Rocketseat 💜 - NLW 05 👩‍🚀
Stars: ✭ 25 (+4.17%)
Mutual labels:  flutter-demo, flutter-examples, flutter-app
flutter-UI
将Flutter各种Widget各种API📘都实现一次。喜欢请Star。
Stars: ✭ 67 (+179.17%)
Mutual labels:  flutter-demo, flutter-examples, flutter-app
stuff
Crud operation with Firebase
Stars: ✭ 80 (+233.33%)
Mutual labels:  flutter-demo, flutter-examples, flutter-app
boxgame
A sample project for following along a tutorial found on jap.alekhin.io.
Stars: ✭ 32 (+33.33%)
Mutual labels:  flutter-demo, flutter-examples, flutter-app
car rental lite
A platform for car sharing where users can book any car that suits their needs and wants for their intended journey, from the closest hosts in the community.
Stars: ✭ 28 (+16.67%)
Mutual labels:  flutter-demo, flutter-examples, flutter-app
calmly
Calmly is made with flutter to practice meditation to bring headspace and calmness. 😍💆🏼‍♂️
Stars: ✭ 34 (+41.67%)
Mutual labels:  flutter-demo, flutter-examples, flutter-app
baemin-clone
Baemin app clone by Flutter
Stars: ✭ 28 (+16.67%)
Mutual labels:  flutter-demo, flutter-examples, flutter-app
Bank-profile
a flutter Ui profile for bank account
Stars: ✭ 33 (+37.5%)
Mutual labels:  flutter-demo, flutter-examples, flutter-app
Best Flutter Ui Templates
completely free for everyone. Its build-in Flutter Dart.
Stars: ✭ 13,448 (+55933.33%)
Mutual labels:  flutter-demo, flutter-examples, flutter-app
flutter new retail
a new retail project
Stars: ✭ 115 (+379.17%)
Mutual labels:  flutter-demo, flutter-examples, flutter-app
flutter todos
A cross platform todo list app using flutter, sqlite etc. If you read the code, you will understand how to create simple elegant mobile app using Flutter and Dart language.
Stars: ✭ 60 (+150%)
Mutual labels:  flutter-demo, flutter-examples, flutter-app
E-commerce
A Flutter E-commerce by implementing the Carousel and other flutter components
Stars: ✭ 36 (+50%)
Mutual labels:  flutter-demo, flutter-examples
LoginAndRegistrationWithSocialMedia
Created a Project to design login screen, registration screen, login with google ,slider navigation drawer,dashboard screen login with Facebook using Flutter
Stars: ✭ 82 (+241.67%)
Mutual labels:  flutter-demo, flutter-examples
spark list
这是一款开源笔记应用, 支持Android/iOS双平台, 使用Flutter 3开发, 体验Flutter的同时也希望做一个能成为个人知识中转站的应用, 任重道远 :)
Stars: ✭ 47 (+95.83%)
Mutual labels:  flutter-examples, flutter-app
flutter-app
Full Feature Todos Flutter Mobile app with fireStore integration.
Stars: ✭ 138 (+475%)
Mutual labels:  flutter-examples, flutter-app
flutter pokedex
Pokedex app built with Flutter (with lots of animations) using Clean Architecture
Stars: ✭ 1,603 (+6579.17%)
Mutual labels:  flutter-demo, flutter-examples
flutter-tips
My collection of Flutter development tips
Stars: ✭ 36 (+50%)
Mutual labels:  flutter-demo, flutter-examples
作者 gaoyong
创建时间 2020-11-04 13:40:00

gleam

一个简单、轻量、可靠的Flutter UI 组件库

介绍

在业务开发中经常会有一些常用的组件,将这些常用的组件标准化后,有了这个库

希望gleam是一个简单、轻量、可靠的Flutter UI 组件库

安装

  1. 在项目的pubspec.yaml中在增加下面配置:gleam: ^1.0.0
  2. 第二步:然后在项目根目录(pubspec.yaml 所在的目录)执行命令:flutter pub get

介绍

BottomSheet 底部菜单弹窗

​ 底部弹出的菜单

示意图

基础用法 展示取消按钮 展示描述信息 选项状态 自定义面板

调用showGleamBottomSheet函数后弹出的底部菜单弹窗,其中操作项使用BottomSheetAction组件

参数说明
参数名称 说明 类型 默认值
context 上下文 BuildContext -
actions 操作项列表 List -
contentWidget 内容区域Widget (如果设置contentWidget,则actions、description、cancelText、onCancelTap的设置不生效) Widget -
description 顶部显示的描述(可以是文字或者Widget) dynamic -
cancelText 取消文案(没有设置则不显示“取消”按钮) String -
onCancelTap 取消按钮点击回调方法 GestureTapCallback -

BottomSheetAction组件属性说明

属性名称 说明 类型 默认值
item 操作项(可以是文字或者Widget) dynamic -
height 操作项高度 double 50
onTap 操作项点击回调方法 GestureTapCallback -
hiddenDivider 是否隐藏操作项下方分割线 bool false
代码演示
//基础用法
showGleamBottomSheet(context, actions: [
  BottomSheetAction('选项一', onTap: () {
    showToast('选项一');
  }),
  BottomSheetAction('选项二', hiddenDivider: true, onTap: () {
    showToast('选项二');
  }),
]);

//展示取消按钮
showGleamBottomSheet(
  context,
  actions: [
    BottomSheetAction('选项一', onTap: () {
      showToast('选项一');
    }),
    BottomSheetAction(
      '选项二',
      hiddenDivider: true,
      onTap: () {
        showToast('选项二');
      },
    ),
  ],
  cancelText: '取消',
  onCancelTap: () {
    showToast('取消');
  },
);

//展示描述信息
showGleamBottomSheet(
  context,
  actions: [
    BottomSheetAction('选项一', onTap: () {
      showToast('选项一');
    }),
    BottomSheetAction(
      '选项二',
      hiddenDivider: true,
      onTap: () {
        showToast('选项二');
      },
    ),
  ],
  description: Container(
    padding: EdgeInsets.only(top: 20.0, bottom: 20.0),
    height: 60.0,
    child: Text(
      '这是描述信息',
      style: Style.normal15Color999999,
    ),
  ),
  cancelText: '取消',
  onCancelTap: () {
    showToast('取消');
  },
);

//选项状态
showGleamBottomSheet(
  context,
  actions: [
    BottomSheetAction(
      Text(
        '着色选项',
        style: Style.normal15ColorFF0000,
      ), onTap: () {
        showToast('着色状态');
      }),
    BottomSheetAction(
      Text(
        '禁用选项',
        style: Style.normal15Color999999,
      ),
      onTap: null,
    ),
    BottomSheetAction(
      CupertinoActivityIndicator(),
      hiddenDivider: true,
      onTap: () {
        showToast('loading...');
      },
    ),
  ],
  cancelText: '取消',
  onCancelTap: () {
    showToast('取消');
  },
);

//自定义面板
showGleamBottomSheet(
  context,
  contentWidget: Container(
    height: 200.0,
    child: Stack(
      children: [
        Positioned(
          top: 0,
          right: 0,
          child: IconButton(
            icon: Icon(Icons.close),
            color: AppColors.clC8C9CC,
            onPressed: () {
              Navigator.of(context).pop();
            },
          ),
        ),
        Column(
          children: [
            SizedBox(
              height: 16.0,
            ),
            Row(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                Text(
                  "标题",
                  style: Style.bold15Color333333,
                )
              ],
            ),
            Expanded(
              child: Center(
                child: Text('内容'),
              ),
            ),
          ],
        ),
      ],
    ),
  ),
              );
Dialog 弹出框

​ 弹出模态框,常用于消息提示、消息确认、在当前页面内完成特定的交互操作

Empty 空状态

​ 空状态时的占位提示

FilledButton 填充按钮

​ 填充按钮的文字为白色,背景为按钮的颜色

GleamOutlineButton 细边框按钮

​ 细边框按钮的文字,和边框为按钮的颜色,背景为白色

GleamTextButton 文字按钮

​ 文字按钮只有一个文字,该文字可以点击

GleamTextField 文本输入框

​ 提供文本输入框右侧尾随的Widget扩展

GleamIcon 图标

​ 提供Icon及Icon上红点及消息未读数显示

GleamImage 图片

​ 提供多种图片来源网络图片、本地图片、资源图片,支持圆角、支持占位图、失败图

ImagePicker 照片选择

​ 从手机相册选择照片

Placeholder 占位状态

​ 占位状态时的组件

Search 搜索

​ 搜索输入框

ShareSheet 分享面板

​ 底部弹起的分享面板,用于展示各分享渠道对应的操作按钮,不含具体的分享逻辑。

Tag 标签

​ 文字,或者图标+

依赖

打包

export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7890

set http_proxy=http://127.0.0.1:7890 set https_proxy=http://127.0.0.1:7890

flutter packages pub publish --dry-run flutter packages pub publish --server=https://pub.dartlang.org

团队成员

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].