FLUTTER ECOSYSTEM

brworkit/flutter-package-string-to-color

文字列の色名を Color および MaterialColors に変換する Flutter パッケージ

flutterパッケージ文字列から色へ のプロジェクト画像
Stars
7
Forks
1
最終プッシュ(UTC)
2020/06/05
プロジェクト状態
公開中
brworkit GitHub avatar
GITHUB User

brworkit ↗

“For a moment, nothing happened. Then, after a second or so, nothing continued to happen.” ― Douglas Adams, The Hitchhiker's Guide to the Galaxy

São Paulo - Brasil
言語DartSwiftKotlinObjective-C

このリポジトリが公開するパッケージ

使用している依存関係

依存関係一覧 2 件
  • flutter{"sdk":"flutter"}
  • flutter_test開発用{"sdk":"flutter"}

元の README

以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。

README を開く / 閉じる

strcolor

Dart Pub

Description

Flutter package to convert color names to Color in Flutter.

Offers a handful way to use colors using their names instead of using Colors constants.

It is specialy useful when you need to place color in a component comming dynamically from server.

All Flutter Colors constants supported.

Hexa Colors supported.

Getting Started

In your flutter project add the dependency:

dependencies:
  ...  
  strcolor: ^1.1.1

Usage example

import 'package:strcolor/strcolor.dart';

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(        
        primarySwatch: "purple".color(), // write the color name. When you receive dynamic color name from server this is much more useful.                
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

Dart Pub

strcolor

Author

2020 brworkit.

License

MIT License.