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

패키지 상세v0.0.4

theme_manager_plus

테마 데이터가 더 이상 없습니다. 테마 클래스로 테마를 사용자 지정하세요

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
24
좋아요
20
Pub 점수
150

패키지 설치

flutter pub add theme_manager_plus

패키지 개요

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

ThemeManagerPlus는 개발자가 사용자 정의 테마 클래스를 정의할 수 있게 함으로써 Flutter 앱에서 테마 관리를 단순화하여 반복적인 테마 데이터가 필요 없게 합니다. 다양한 플랫폼 간에 라이트 모드와 다크 모드 테마를 처리하는 깔끔하고 재사용 가능한 접근 방식을 제공합니다. Android, iOS, Web, macOS, Windows, Linux에 내장된 지원을 통해 일관된 UI 경험을 보장합니다. 직관적인 API를 통해 테마 전환 및 맞춤 설정을 간소화하여 최소한의 부가 코드로 동적 테마를 필요로 하는 앱에 이상적입니다.

사용 사례

  • 다이나믹 테마 전환
  • 다중 플랫폼 테마 일관성
  • 사용자 정의 테마 클래스 구현
  • 라이트 모드 및 다크 모드 관리
  • 앱 전체 테마 사용자 정의

주요 기능

  • 사용자 정의 테마 클래스 지원
  • 내장된 라이트/다크 모드 전환
  • 플랫폼에 관계없는 설계
  • 최소한의 보일러플레이트
  • 기존 코드와의 간편한 통합

적합한 대상

  • 복잡한 테마 요구 사항이 있는 Flutter 앱
  • 재사용 가능한 테마 로직을 찾는 개발자
  • 다중 플랫폼 애플리케이션
  • 사용자 테마 선호도를 요구하는 앱
  • 클린 아키텍처에 중점을 둔 프로젝트

고려 사항

  • Flutter의 테마 시스템에 대한 이해가 필요합니다
  • 추가 상태 관리가 필요할 수 있습니다
  • 간단한 정적 테마에 적합하지 않습니다
  • 적절한 초기화에 의존함
  • 기본 설정 외에는 문서가 제한적입니다

원본 README

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

theme_manager_plus

Say goodbye to the hassle of remembering complex color schemes! With Theme Manager Plus, managing themes is a breeze. Simply create a class for light and dark themes, tweak your desired colors and styles, and enjoy a seamless and modern app experience. No more headaches, just easy and efficient theme management!

simulator-screen-recording-iphone-15-pro-2024-01-31-at-214253_5zDSZU03-ezgif com-video-to-gif-converter

Getting started

First, add theme_manager_plus as a dependency in your pubspec.yaml file

theme_manager_plus: ^[version]

Create Your own class which defines colors and styles which you have to inject e.g

class AppTheme {
  Color? backgroundColor;
  TextStyle? heading;
  TextStyle? subheading;

  AppTheme({this.backgroundColor, this.heading, this.subheading});
}

Wrap your material app with the ThemeMangerWrapper and assign your light and dark theme and set the current theme to initial theme you want

home:ThemeManagerPlus<AppTheme>(
          currentTheme: lightTheme,
          darkTheme: Darktheme,
          lightTheme: lightTheme,
          child: MyApp()),
    );

Access data from theme

context.themeOf<AppTheme>()?.backgroundColor

Note: Replace your class name with the custom class name

Change current theme with theme manager plus

 context.changeCurrentTheme<AppTheme>();

Check current theme is dark theme

bool isDarkMode context.isDarkMode<AppTheme>();

Contribution 🤝

Feel free to contribute and open pull requests. 🙌

Issues and Feedback 🐛

Feel free to post a feature requests or report a bug here.

카테고리

소스 저장소

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

아직 데이터가 없습니다.