Google UI is an open-source UI library for developing cross-platform apps using Flutter with Material Design 2.0

Overview

Google UI

Google UI is an open-source UI library for developing cross-platform apps using Flutter with "Material Design 2.0"

Table of contents

Installation

Setup font

Google UI uses poppins font family as an alternative to product sans

  • Download the font
  • Import font to pubspec.yaml
fonts:
  - family: Poppins
    fonts:
      - asset: fonts/Poppins/Poppins-Light.ttf
      - asset: fonts/Poppins/Poppins-LightItalic.ttf
        weight: 300
      - asset: fonts/Poppins/Poppins-Regular.ttf
      - asset: fonts/Poppins/Poppins-Italic.ttf
        weight: 400
      - asset: fonts/Poppins/Poppins-Medium.ttf
      - asset: fonts/Poppins/Poppins-MediumItalic.ttf
        weight: 500

Install riverpod

Some Google UI widgets is managing the state using flutter_riverpod

  • Follow instalation instruction here
  • Replace main function in lib/main.dart with
void main() {
  runApp(const ProviderScope(child: App()));
}

Install Google UI

  • Follow instalation instruction here

  • Register the theme

return MaterialApp(
  title: "YOUR APP TITLE",
  theme: GThemeGenerator.generate(),
  darkTheme: GThemeGenerator.generateDark(),
  home: const HomePage(),
);

Widgets

Button

GElevatedButton

GElevatedButton(
  "Click me"
  onPressed: () {},
);

GElevatedButton(
  "Click me",
  icon: const Icon(Icons.star),
  onPressed: () {},
),

// Equivalent to

ElevatedButton(
  onPressed: () {},
  child: Text("Click me"),
),

ElevatedButton.icon(
  onPressed: () {},
  icon: const Icon(Icons.star),
  label: Text("Click me"),
),

GTextButton

GTextButton(
  "Click me"
  onPressed: () {},
);

GTextButton(
  "Click me",
  icon: const Icon(Icons.star),
  onPressed: () {},
),

// Equivalent to

TextButton(
  onPressed: () {},
  child: Text("Click me"),
),

TextButton.icon(
  onPressed: () {},
  icon: const Icon(Icons.star),
  label: Text("Click me"),
),

GOutlinedButton

GOutlinedButton(
  "Click me"
  onPressed: () {},
);

GOutlinedButton(
  "Click me",
  icon: const Icon(Icons.star),
  onPressed: () {},
),

// Equivalent to

OutlinedButton(
  onPressed: () {},
  child: Text("Click me"),
),

OutlinedButton.icon(
  onPressed: () {},
  icon: const Icon(Icons.star),
  label: Text("Click me"),
),

ListTile

GListTile

GListTile(
  title: "Title",
  subtitle: "Subtitle",
),

// Equivalent to

ListTile(
  title: Text("Title"),
  subtitle: Text("Subtitle"),
),

GDrawerListTile

GDrawerListTile(
  leading: const Icon(Icons.inbox_outlined),
  title: "Inbox",
  trailing: const Text("1"),
  selected: true,
  onTap: () {},
),

GSwitch

GSwitch(
  title: "Switch",
  subtitle: "Switch subtitle",
  value: value,
  onChanged: (value) {},
),

GRadio

GRadio<int>(
  title: "Radio 1",
  value: 1,
  groupValue: value,
  onChanged: (value) {},
),

GCheckBox

GCheckBox(
  title: "Check box",
  subtitle: "Check box subtitle",
  value: value,
  onChanged: (value) {},
),

GSelectBox

GSelectBox<int>(
  value: value,
  items: [
    GSelectBoxItem(
      title: "Select 1",
      value: 1,
    ),
    GSelectBoxItem(
      title: "Select 2",
      value: 2,
    ),
    GSelectBoxItem(
      title: "Select 3",
      value: 3,
    ),
  ],
  onChanged: (value) {},
),

GAppBar

GAppBar(title: "App bar"),

// App bar with search bar
GSearchAppBar(
  title: "Search app bar",
  hintText: "Search something...",
),

Field

GTextFormField(labelText: "Username"),

// Password field
GTextFormField(
  labelText: "Password",
  passwordField: true,
),

// Date field
GDateTextFormField(labelText: "Date"),

GErrorMessage

GErrorMessage(
  icon: const Icon(Icons.wifi_off_outlined),
  title: "No internet",
  subtitle:
      "Can't connect to the internet.\nPlease check your internet connection",
  onPressed: () {},
),

Grid

// Non scrollable grid
GGrid(
  gap: 16,
  padding: EdgeInsets.all(16),
  columnCount: 3,
  children: [],
)

// Scrollable grid
GGridBuilder(
  gap: 16,
  padding: EdgeInsets.all(16),
  columnCount: 3,
  itemCount: 10,
  itemBuilder: (context,index) =>  child,
),

GText

GText(
  "headline1",
  variant: GTextVariant.headline1,
),

// variant
// - headline1
// - headline2
// - headline3
// - headline4
// - headline5
// - headline6
// - subtitle1
// - subtitle2
// - bodyText1
// - bodyText2
// - button
// - caption
// - overline
You might also like...

Shopping App developed using Flutter and Dart making use of Provider, Carousel Library, Google FireStore

Shopping App developed using Flutter and Dart making use of Provider, Carousel Library, Google FireStore. It's featuring standard modern shopping app UI

Jan 3, 2023

Flutter Google Sheets Example and Neumorphic Design

Flutter Google Sheets Example and Neumorphic Design

Flutter Google Sheets Example and Neumorphic Design Google Sheet is a web-based spreadsheet application created by Google. Google Sheet allows collabo

Jul 26, 2022

Beautiful Nike Web Design Concept With Flutter Beautiful Nike Web Design Concept With Flutter

flutter_web_nike A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started

Jan 28, 2022

Travel-Application-Ui-design - A Simple Travel Application Ui design For Flutter

Travel-Application-Ui-design - A Simple Travel Application Ui design For Flutter

Flutter Simple Travel Application UI Design A part of #flutter100daysofcode. Let

Jan 28, 2022

Quiz App with Simple Material UI

Quiz App with Simple Material UI

Quizzler ❓ Brief A Quiz app that tests your general knowledge. As one of the most popular types of apps on the app stores, you can create your own qui

Jan 13, 2022

Cooking apps - Cooking App made using flutter framework

Cooking apps - Cooking App made using flutter framework

cooking_apps Cooking App made using flutter framework. This template app contain

Jan 24, 2022

Cryptocurrency App with MVP Design Pattern to track all the coins data in realtime for android & iOS . Written in dart using Flutter SDK.

Cryptocurrency App with MVP Design Pattern to track all the coins data in realtime for android & iOS . Written in dart using Flutter SDK.

Flutter CryptoCurrency App (MVP) Cryptocurrency App with MVP design pattern to track all the coins data in realtime for android & iOS . Written in dar

Dec 30, 2022

A fully responsive BMI calculator app made using flutter and dart with beautiful minimalistic user interface design and easy to use .

A fully responsive BMI calculator app made using flutter and dart with beautiful minimalistic user interface design and easy to use .

BMI_Calculator_Flutter A fully responsive BMI calculator app made using flutter and dart with beautiful minimalistic user interface design and easy to

Oct 9, 2021

Check out the new style for App Design aims for the Vegetable Order Service using jetpack compose

Check out the new style for App Design aims for the Vegetable Order Service using jetpack compose

VegetableOrderUI-Android Check out the new style for App Design aims for the Vegetable Order Service using jetpack compose... 😉 😀 😁 😎 Screenshots

Dec 29, 2022
Flute Music Player - First Open Source Flutter based material design music player with audio plugin to play local music files.

Flute Music Player Plugin Only Updated to androidx First Open Source Flutter based material design music player with audio plugin to play local music

Pawan Kumar 316 Nov 23, 2022
A cross-platform BlockChain Based Application that performs Data and Sentimental Analysis using Machine Learning Algorithms.

DynaMedico Mobile App A new Flutter application. Getting Started This project is a starting point for a Flutter application. A few resources to get yo

null 6 May 10, 2022
A demonstration of a Flutter appbar and material design icons with Hydro-SDK

A demonstration of a Flutter appbar and material design icons with Hydro-SDK

Hydro-SDK 0 Jan 20, 2022
Simple tool to open WhatsApp chat without saving the number, developed using Google's Flutter Framework.

Simple tool to open WhatsApp chat without saving the number, developed using Google's Flutter Framework. for Android/ IOS/ Desktop/ Web

Swarup Bhanja Chowdhury 15 Nov 1, 2022
WhatsApp is a cross-platform mobile appllication that provides an end-end encrypted instant messaging system And i build a clone of it with flutter.

whatsapp_clone Table of contents General info Youtube video Technologies Packages & libraries used Features Setup General info WhatsApp is a cross-pla

Imad Eddarraz 7 Dec 23, 2022
Flutter project integrated with Supabase, the Firebase open source alternative

This is a Flutter project integrated with Supabase, the Firebase open source alternative. This project is a sandbox for playground for Flutter & Supabase integration.

anegrete 13 Oct 18, 2022
Flutter based Open Source Hentai Viewer App

Flutter based Open Source Hentai Viewer App

Project Violet 283 Jan 2, 2023
An open source Github client App developed by Flutter

English Readme 一款跨平台的开源Github客户端App,提供更丰富的功能,更好体验,旨在更好的日常管理和维护个人Github,

Shuyu Guo 13.7k Dec 31, 2022
Open source code for Bonfire flutter app

Open source code for Bonfire flutter app

SSebigo 12 Nov 15, 2022
Flutter: Integrate Google Maps Tutorial Flutter: Integrate Google Maps Tutorial

Flutter Google Maps APP Show some ❤️ and star the repo to support the project A new Flutter project. Getting Started Flutter Project Add this to your

Pawan Kumar 69 Oct 27, 2022