A Simple, Lightweight and Reliable Flutter UI Component Library

A Simple, Lightweight and Reliable Flutter UI Component Library

There are often some commonly used components in business development. After these commonly used components are standardized, this library is available. I hope gleam is a simple, lightweight and reliable Flutter UI component library

gleam

A simple, lightweight and reliable Flutter UI component library

Introduction

There are often some commonly used components in business development. After these commonly used components are standardized, this library is available

I hope gleam is a simple, lightweight and reliable Flutter UI component library

installation

  1. Add the following configuration to the project’s pubspec.yaml: gleam: ^1.0.0
  2. Step 2: Then execute the command in the project root directory (the directory where pubspec.yaml is located): flutter pub get

Introduction

BottomSheet bottom menu pop-up window

​ The pop-up menu at the bottom

####### Schematic diagram

Basic usageShow cancel buttonDisplay description informationOption statusCustom panel

The bottom menu pop-up window that pops up after calling the showGleamBottomSheet function, the operation item uses the BottomSheetAction component

[](#Parameter description) Parameter description
Parameter name Description Type Default value
context Context BuildContext -
actions List of action items List -
contentWidget Content area Widget (If contentWidget is set, the settings of actions, description, cancelText, and onCancelTap will not take effect) Widget -
description The description displayed at the top (can be text or Widget) dynamic -
cancelText Cancel the copy (if there is no setting, the "Cancel" button will not be displayed) String -
onCancelTap Cancel button click callback method GestureTapCallback -

BottomSheetAction component attribute description

Property name Description Type Default value
item Operation item (can be text or Widget) dynamic -
height Operation item height double 50
onTap Action item click callback method GestureTapCallback -
hiddenDivider Whether to hide the dividing line below the operation item bool false
Code demo
//Basic usage 
showGleamBottomSheet (context, actions : [
   BottomSheetAction ( 'option one' , onTap : () {
     showToast ( 'option one' );
  }),
  BottomSheetAction ( 'option two' , hiddenDivider :  true , onTap : () {
     showToast ( 'option two' );
  }),
]);

//Show the cancel button 
showGleamBottomSheet (
  context,
  actions : [
     BottomSheetAction ( 'option one' , onTap : () {
       showToast ( 'option one' );
    }),
    BottomSheetAction (
       'Option Two' ,
      hiddenDivider: true,
      onTap : () {
         showToast ( 'option two' );
      },
    ),
  ],
  cancelText :  'Cancel' ,
  onCancelTap : () {
     showToast ( 'Cancel' );
  },
);

//Display description information 
showGleamBottomSheet (
  context,
  actions : [
     BottomSheetAction ( 'option one' , onTap : () {
       showToast ( 'option one' );
    }),
    BottomSheetAction (
       'Option Two' ,
      hiddenDivider: true,
      onTap : () {
         showToast ( 'option two' );
      },
    ),
  ],
  description: Container(
    padding: EdgeInsets.only(top: 20.0, bottom: 20.0),
    height: 60.0,
    child :  Text (
       'This is description information' ,
      style: Style.ts_999999_15,
    ),
  ),
  cancelText :  'Cancel' ,
  onCancelTap : () {
     showToast ( 'Cancel' );
  },
);

//Option status 
showGleamBottomSheet (
  context,
  actions : [
     BottomSheetAction (
       Text (
         'Coloring options' ,
        style: Style.ts_FF0000_15,
      ), onTap : () {
         showToast ( 'coloring state' );
      }),
    BottomSheetAction (
       Text (
         'Disable option' ,
        style: Style.ts_999999_15,
      ),
      onTap: null,
    ),
    BottomSheetAction(
      CupertinoActivityIndicator(),
      hiddenDivider: true,
      onTap: () {
        showToast('loading...');
      },
    ),
  ],
  cancelText :  'Cancel' ,
  onCancelTap : () {
     showToast ( 'Cancel' );
  },
);

//Custom panel 
showGleamBottomSheet (
  context,
  contentWidget: Container(
    height: 200.0,
    child: Stack(
      children: [
        Positioned(
          top: 0,
          right: 0,
          child: IconButton(
            icon: Icon(Icons.close),
            color: AppColors.clA1A1A1,
            onPressed: () {
              Navigator.of(context).pop();
            },
          ),
        ),
        Column(
          children: [
            SizedBox(
              height: 16.0,
            ),
            Row(
              mainAxisAlignment: MainAxisAlignment.center,
              children : [
                 Text (
                   "Title" ,
                  style: Style.ts_333333_15_bold,
                )
              ],
            ),
            Expanded(
              child: Center(
                child :  Text ( 'content' ),
              ),
            ),
          ],
        ),
      ],
    ),
  ),
              );
Dialog pop-up box

​ Pop-up modal boxes, often used for message prompts, message confirmations, and complete specific interactive operations in the current page

Empty

​ Occupation reminder when empty

FilledButton Filled Button

​ The text of the filled button is white, and the background is the color of the button

GleamOutlineButton thin border button

​ The text of the thin border button, and the border is the button color, the background is white

GleamTextButton text button

​ The text button has only one text, which can be clicked

GleamTextField text input box

​ Provides a Widget extension on the right side of the text input box

GleamIcon icon

​ Provide red dots on Icon and Icon and unread message display

GleamImage image

​ Provide a variety of image sources network images, local images, resource images, support rounded corners, support placeholder images, failure images

ImagePicker photo selection

​ Select photos from phone album

Placeholder status

​ Components in Occupied State

​ Search input box

ShareSheet share panel

​ The pop-up sharing panel at the bottom is used to display the corresponding operation buttons of each sharing channel, without specific sharing logic.

Tag

​ text, or icon+

Download Details:

Author: gaoyong06

Source Code: https://github.com/gaoyong06/gleam

flutter dart mobile-apps

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Google's Flutter 1.20 stable announced with new features - Navoki

Google has announced new flutter 1.20 stable with many improvements, and features, enabling flutter for Desktop and Web

Top 25 Flutter Mobile App Templates in 2020

Flutter has been booming worldwide from the past few years. While there are many popular mobile app development technologies out there, Flutter has managed to leave its mark in the mobile application development world. In this article, we’ve curated the best Flutter app templates available on the market as of July 2020.

Flutter App Development Trends 2020

As the new decade dawns upon us, a slew of technologies has been making a lot of noise to grab the developers’ attention. While native app development is going strong, the trade winds are now blowing towards going cross-platform.

How To Succeed In Mobile App Wireframe Design?

This article covers everything about mobile app wireframe design: what to do and what not, tools used in designing a mobile or web app wireframe, and more.

What is Flutter and why you should learn it?

Flutter is an open-source UI toolkit for mobile developers, so they can use it to build native-looking Android and iOS applications from the same code base for both platforms. Flutter is also working to make Flutter apps for Web, PWA (progressive Web-App) and Desktop platform (Windows,macOS,Linux).