패키지, 저장소 및 앱 카테고리 검색

canton_ui 표지
패키지 상세v1.0.9

canton_ui

Flutter에서 UI를 더 빠르고 효율적으로 개발하기 위한 UI 패키지

30일 다운로드
94
좋아요
32
Pub 점수
50

패키지 설치

flutter pub add canton_ui

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

Canton UI는 재사용 가능하고 일관되며 효율적인 컴포넌트를 제공함으로써 UI 개발을 가속화하기 위해 설계된 Flutter 위젯 라이브러리입니다. 현대적이고 반응형 인터페이스를 쉽게 만들 수 있도록 사전 구축된 위젯 모음을 제공합니다. 개발자 생산성을 최우선으로 고려하여 봐야 할 코드를 줄이고 디자인 시스템의 일관성을 촉진합니다. 빠른 프로토타이핑과 확장 가능한 앱 개발을 지원하며, 여러 프로젝트 간에 시각적 일관성을 유지하려는 팀에게 이상적입니다. 가벼운 구조로 기존 Flutter 워크플로우에 원활하게 통합됩니다.

사용 사례

  • 빠른 UI 프로토타이핑
  • 일관된 디자인 시스템 구축
  • 반복적인 위젯 생성 간소화
  • 앱 개발 주기 가속화
  • 반응형 레이아웃 만들기
  • UI에서 팀 협업 향상

주요 기능

  • 사전 구축된 사용자 정의 가능한 위젯
  • 반응형 디자인 지원
  • 최소한의 보일러플레이트
  • 컴포넌트 간 일관된 스타일링
  • 기존 프로젝트와의 간편한 통합
  • 모듈러 아키텍처

적합한 대상

  • 더 빠른 UI 개발을 원하는 플러터 개발자
  • 디자인 시스템을 사용하는 팀
  • 빠른 MVP 제공이 필요한 스타트업
  • 프론트엔드 중심의 플러터 팀
  • 재사용 가능한 UI 컴포넌트가 필요한 프로젝트

고려 사항

  • 현재 사용 가능한 문서가 제한되어 있습니다
  • 매우 독특한 디자인의 경우 맞춤 설정이 필요할 수 있습니다
  • 표준 UI 패턴을 가진 앱에 가장 적합
  • 복잡한 애니메이션 또는 사용자 정의 렌더링에는 권장되지 않습니다

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

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: <latest_version>

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:

  • Instagram: @31Carlton7
  • Email: carltonaikins7@gmail.com

카테고리

의존성

소스 저장소

이 패키지를 사용하는 프로젝트