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

GitHub 저장소ObjectiveCalendar/easy_settings

easy_settings

ObjectiveCalendar/easy_settings open-source repository details.

easy_settings 프로젝트 이미지
스타
4
포크
0
최근 푸시(UTC)
2025. 3. 14.
프로젝트 상태
활성

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

A package that helps to manage and display settings.

Features

  • An API to manage your settings without difficulty.
  • A widget to display your settings easily.

Image Image

Getting started

Add the following line to pubspec.yaml:

dependencies:
  easy_settings: ^1.0.0

Usage

import 'package:easy_settings/easy_settings.dart';
import 'package:flutter/material.dart';

List<SettingsCategory> settingsCategories = [
  SettingsCategory(
      title: "Category 1",
      iconData: Icons.settings,
      settingsSections: [
        SettingsSection(settingsElements: [
          StringSettingsProperty(
              key: "str",
              title: "This is a String settings",
              defaultValue: "Test",
              iconData: Icons.text_fields),
          IntSettingsProperty(
              key: "integer",
              title: "This is an int settings",
              defaultValue: 3,
              iconData: Icons.numbers),
          DoubleSettingsProperty(
              key: "double",
              title: "This is a double settings",
              defaultValue: 3.14,
              iconData: Icons.double_arrow),
          BoolSettingsProperty(
              key: isDarkKey,
              title: "Dark Theme",
              subtitle: "Do you want to use dark theme ?",
              defaultValue: false,
              iconData: Icons.dark_mode),
          EnumSettingsProperty(
              key: "language",
              title: "Language",
              subtitle: "This is an enum settings",
              defaultValue: 0,
              iconData: Icons.language,
              choices: ["English", "Espanol", "Français"]),
          ButtonSettingsElement(
              title: "Quick reset settings",
              subtitle: "I don't ask for confirmation.",
              iconData: Icons.restore,
              onClick: (BuildContext context) => resetSettings())
        ])
      ])
];

void main() async {
  await initializeSettings(settingsCategories);
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
                  title: 'Settings',
                  home: const MyHomePage());
  }
}

class MyHomePage extends StatelessWidget {
  const MyHomePage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: const Text("Settings"),
        ),
        body: const EasySettingsWidget());
  }
}

Make sure to check out example for more details.

ObjectiveCalendar GitHub avatar
GitHub 작성자

ObjectiveCalendar ↗

언어DartC++CMakeHTMLCSwiftKotlinObjective-C

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 6 개

프로젝트에 맞는 저장소를 선택하려면?

사용 목적에 따라 검색하고 개발 활동을 비교한 뒤 원본 저장소에서 요구 사항을 확인하세요.

  1. 이름, 작성자 또는 설명으로 검색하고 기술 주제로 범위를 좁힙니다.
  2. 스타, 포크, 최근 푸시를 함께 비교하세요. 스타는 관심의 지표이며 품질을 보장하지 않습니다.
  3. 사용하기 전에 GitHub에서 README, 라이선스, Issues를 확인하세요.

출처 및 관리

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗