Canton Design System elements and resources for Flutter.

Overview

Canton UI

Canton UI elements and resources for Flutter.

Examples in Apps

Notes App News App Elisha

Description

This includes things such as themes (colors, typography, etc.), custom methods, buttons, text-inputs, a color picker, and more. This all in attempt to limit the amount of time I spend on remaking simple tools and ui, while still customizing my screens to my flavor. Please note that this package will not be uploaded on pub.dev in the near future.

Getting Started

To use this package and access its content, add this dependency to your pubspec.yaml

dependencies:
    canton_ui: 

And simply import the package using this code

import 'package:canton_ui/canton_ui.dart';

BTW package:flutter/material.dart is already imported when using this package so no need to re-import :)

Using

Note: The package is versatile in a sense that you do not have to use all of the elements in the package. You can mix it in with Material and Cupertino elements with no problem with the exception of certain elements.

CantonApp

Replaces MaterialApp. Recommended that you use this over MaterialApp to get you the theming and lightmode/darkmode switching.

CantonApp(
    title: kAppTitle,
    primaryLightColor: CantonColors.blue // Or any other color,
    primaryLightVariantColor: CantonColors.blue[200]! // Or any other color,
    primaryDarkColor: CantonDarkColors.blue // Or any other color,
    primaryDarkVariantColor: CantonDarkColors.blue[200]! // Or any other color,
    home: YourMainAppWidget(),
)

CantonScaffold

Use this as a replacement for Scaffold() widget. Adds padding and other elements.

CantonScaffold(
    body: Column(
        children: [...]
    )
)

Colors

You can view all the colors at lib/config/themes/(light_theme or dark_theme)/(light or dark)_color_palette.dart

Using colors directly is discouraged and should be accessed through Theme.of(context).colorScheme

This is to allow the light and dark colors to be used in the correct situation (When app is in light mode or dark mode). Exceptions to this rule do apply, for instance when setting up CantonApp.

CantonColors.blue

CantonColors.pink[300]

CantonDarkColors.green

ViewHeader

Instead of using a navbar, CantonUI uses a ViewHeader, in which you can customize the leading and action buttons

ViewHeaderOne(
    title: ...,
    button: ..., // Placed on right side
)


ViewHeaderTwo(
    title: ...,
    backButton: ...,
    isBackButtonClear: ...,
    buttonOne: ...,
    buttonTwo: ...,
)

Buttons

CantonUI has a lot of different buttons to choose from.

ActionButton()

BackButton()

HeaderButton() // Commonly used in ViewHeaders

NullButton() // Great spacer widget

PrimaryButton() // Default button, great for all use cases, highly customizeable

TextInput

CantonUI offers a standard text input and a tag text input field (Used in the note taking app). Both inputs are highly customizeable and it'll look good right out of the box.

CantonTextInput() // obscureText is required if isTextFormField is true

CantonTagTextInput()

Loading

Default Loading Spinner

Loading()

RefreshList

If you're making an app in which pull to refresh is needed (like a news app or an app that needs to call an API) then this widget has you covered.

RefreshList(
    child: ...
)

Responsive

If you need to create a UI that's needs to compensate for different screen sizes, then you can use the Responsive widget to take care of it.

Note: mobile and tablet are required.

Responsive(
    desktop: YourDesktopWidget() // Screens larger than 1100px width,
    tablet: YourTabletWidget() // Screens between 650 - 1149 px width,
    mobile: YourMobileWidget() // Screens between 0 - 649 px width,
)

All Features

  • Null Safe: This package supports null safety.
  • Color system: Credits to the Primer Color system, as this is a modified version of theirs.
  • Typography system: Credits to the Primer typography system.
  • Buttons: Resizable primary button, small/header button and back button with all necessary customizations.
  • Text Inputs: Custom text field, text form fields, and a tag text field.
  • Borders: border customization.
  • Loading icon: Loading icon/widget.
  • Animations(WIP): Fluid animations to give a playful but professional feel.
  • Custom Methods: Custom methods with ease of use.
  • Icon System: Icon system that utilizes Iconly icons, Feather Icons and Cupertino Icons.
  • Custom Fonts: Both serif and sans serif typefaces consisting of Inter UI and Times New Roman.
  • Light theme: Clean light theme.
  • Dark Theme: Clean dark theme with all elements modified.
  • Dynamic Device Theming: Accustoms to light mode and dark mode based on current device.

Dependencies

flutter_riverpod: ^0.14.0+3
flutter_slidable: ^0.6.0
flutter_feather_icons: ^2.0.0+1
flutter_spinkit: ^5.0.0
flutter_svg: ^0.22.0
page_transition: ^2.0.2
liquid_pull_to_refresh: ^3.0.0
cupertino_icons: ^1.0.3

Figma

Link to design system on figma to view UI elements

Socials

If you have any questions, you can reach me here:

You might also like...

A tool which automatically generates Flutter localization resources from CSV and Excel files.

flappy_translator A tool which automatically generates Flutter localization resources from CSV and Excel files. This is especially useful as any team

Sep 15, 2022

This repo contains a collection of permission related Flutter plugins which can be used to request permissions to access device resources in a cross-platform way.

Flutter Permission Plugins Deprecation Notice This repository has been replaced by the Flutter permission_handler plugin and will not longer be mainta

Dec 13, 2021

A go-to handbook with a curated set of resources to help the participants of any Flutter Hackathon..

A go-to handbook with a curated set of resources to help the participants of any Flutter Hackathon..

Let's Get to Speed for Your Next Hackathon Legacy Hack'19, the first of its kind International Flutter Hackathon, organised by the Flutter Community a

Dec 6, 2022

An Effort to gather all Flutter Create App submissions at one place from various resources.

An Effort to gather all Flutter Create App submissions at one place from various resources.

 Flutter Create Submissions 2019 🏆 An Effort to gather all Flutter Create App submissions at one place from various resources. If you would like to

Dec 17, 2022

Flutter project to Integrate API resources from JSON Place Holder API

Flutter project to Integrate API resources from JSON Place Holder API

rest_api_jsonplaceholder About This flutter project helps to Integrate API resources from JSON Place Holder API API Source: https://jsonplaceholder.ty

Apr 28, 2022

Dart package responsible to provide the basic resources to Lambda Functions with Clean Dart

AWS Lambda Core This package is responsible to provide the basic resources to all services; Usage pubspec.yaml dependencies: aws_lambda_core: laste

Dec 2, 2021

Megalinks is an android app where we provide free resources available for video editing, like Scenepacks, project files of the big editor, tutorials, etc...

Megalinks is an android app where we provide free resources available for video editing, like Scenepacks, project files of the big editor, tutorials, etc...

MegaLinks Megalinks is an android app where we provide free resources available for video editing, like Scenepacks, project files of the big editor, t

Jul 8, 2022

A Dart client for the NATS messaging system. Design to use with Dart and Flutter.

Dart-NATS A Dart client for the NATS messaging system. Design to use with Dart and flutter. Flutter Web Support by WebSocket client.connect(Uri.parse(

Nov 18, 2022

Implements Microsoft's Fluent Design System in Flutter.

Implements Microsoft's Fluent Design System in Flutter.

fluent_ui Design beautiful native windows apps using Flutter Unofficial implementation of Fluent UI for Flutter. It's written based on the official do

Dec 29, 2022
Owner
Carlton Aikins
Senior at Independence High School with a love for programming. Currently working on BudgetMe, an app to help save money to achieve a goal.
Carlton Aikins
Design system flutter - A framework contains SBB (Swiss Federal Railways) UI elements for Flutter Apps

Design System Mobile for Flutter Design System Mobile in Flutter (yes, it could

Swiss Federal Railways (SBB) 14 Dec 22, 2022
It's OK to love Flutter and hate hand-coding design elements. Parabeac-Core converts design files into Flutter code.

Parabeac-Core Parabeac-Core converts design files into Flutter code driven by open-source & community. Contribute · Discord Community · Designer Proto

Parabeac 536 Jan 4, 2023
An alternative UI for the Human Resources Management System.

Human Resources Management System Frontend with Flutter An alternative UI for the Human Resources Management System that uses Flutter Framework and pr

Bulent Baris Kilic 18 Sep 7, 2022
Custom style-dictionary transforms and formats to generate Flutter resources from a Figma Design Token plugin export..

style-dictionary-figma-flutter An extension to style-dictionary to support more custom types with Flutter as target platform. It supports the custom t

Aloïs Deniel 24 Dec 30, 2022
A periodic table app with 3D view of the elements built using flutter.

A flutter app which takes you on a 3d visualisation of the 118 elements of the periodic table. promo.mp4 Tech Stack Deployed using How it all began It

Shanwill Pinto 48 Nov 16, 2022
A modern app made with Flutter to track the chemical elements.

Elements A modern app to track the chemical elements. Including all 118 elements, with their weight, radiation, consistency, type, block, and electron

Kristóf Kékesi 13 Nov 28, 2021
A #Flutter package that let you draw a flow chart diagram with different kind of customizable elements

Flutter Flow Chart A package that let you draw a flow chart diagram with different kind of customizable elements. Dashboards can be saved for later us

Marco Bavagnoli 50 Jan 1, 2023
A simple widget for having UI elements that respond to taps with a spring animation.

spring_button A simple widget for having child widgets that respond to gestures with a spring animation. Media | Description | How-to-Use Media Watch

AliYigitBireroglu 73 Oct 26, 2022
Rajagiri connect is a networking platform that enables the students of Rajagiri to form a social network among themselves, enabling them to connect with their seniors, juniors and faculty for sharing of information and resources.

Rajagiri Connect Rajagiri connect is a networking platform that enables the students of Rajagiri to form a social network among themselves, enabling t

Muhammad Amaan 2 Nov 27, 2022
An Application built for students to access Notes , Question Papers , Syllabus and Resources for all Subjects of O.U (Osmania University) using Flutter 📘👨‍🎓

OU Notes [Osmania University (O.U)] . For the Students , By the Students. An Application for Osmania University students to access educational materia

Abdul Malik 212 Nov 20, 2022