flutter_direct 0.0.7+4

  • Readme
  • Changelog
  • Example
  • Installing
  • 66

flutter_direct #

Flutter Direct is a Design System for Home Credit Indonesia Tippers App.

Usage #

To use this plugin, add flutter_direct as a dependency in your pubspec.yaml file.

Example #

Please see the example app of this plugin for a full example.

  DirectText(
    data: 'Font Family - Pt Sans',
    fontFamily: DirectFont.PtSans,
    color: Colors.white,
  ), 
  

 DirectFilledButton(
    text: "Active Button",
    fontSize: 16,
    buttonState: DirectButtonState.Active,
    fontFamily: DirectFontFamily.PtSans,
    fontWeight: FontWeight.normal,
    onTap: () {},
    ),

[0.0.7+4] - Release #

  • add nore text style component

[0.0.7+3] - Release #

  • add text style component

[0.0.7+2] - Release #

  • fix naming component

[0.0.7+1] - Release #

  • Add button state tapable

[0.0.7] - Release #

  • Add revision button
  • Add revision font
  • Add revision text
  • Add revision appbar font

[0.0.6] - Release #

  • Add custom stepper
  • Add atomic backdrop

[0.0.5+2] - Release #

  • Add font appbar

[0.0.5] - Release #

  • Image Component
  • Grid Component

[0.0.4] - Release #

  • Home v5
  • Home v6 fixed
  • Inbox
  • Input Component
  • List Style Component
  • Arc Clipper
  • Atom
  • Custom Card
  • Custom Card v2
  • Custom Input
  • Custom List
  • Molecule
  • Molecule List View

[0.0.3+1] - Release #

  • Add License

[0.0.3] - Release #

  • Add Typography, Font & Color

[0.0.2] - Release #

  • Add Tippers Button

[0.0.1] - Release #

  • An initial repo for ui packages based on atomic design

example/lib/main.dart

import 'package:example/revision/font/button_screen.dart';
import 'package:example/revision/font/color_screen.dart';
import 'package:example/revision/font/font_screen.dart';
import 'package:flutter/material.dart';

const AppBarColor = const Color(0xFF1F2430);
const BgColor = const Color(0xFF2A3950);

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      initialRoute: '/',
      routes: {
        '/button': (context) => ButtonScreen(),
        // '/typography': (context) => TypographyComponent(),
        // '/color': (context) => ColorComponent(),
        // '/input': (context) => InputComponent(),
        // '/listtile': (context) => ListitleComponent(),
        // '/homepp': (context) => PPHomeScreen(),
        // '/homeppv5': (context) => PPHomeScreenV5(),
        // '/homeppv6': (context) => PPHomeScreenV6(),
        // '/inboxpp': (context) => PPInboxScreen(),
        // '/image': (context) => ImageComponent(),
        // '/grid': (context) => GridComponent()
        '/color': (context) => ColorScreen(),
        '/font': (context) => FontScreen(),
      },
      theme: ThemeData(
        appBarTheme: AppBarTheme(
          color: AppBarColor,
        ),
        primaryTextTheme: Typography(platform: TargetPlatform.iOS).white,
        textTheme: Typography(platform: TargetPlatform.iOS).white,
      ),
      home: HomeScreen(),
    );
  }
}

class HomeScreen extends StatefulWidget {
  @override
  _HomeScreenState createState() => _HomeScreenState();
}

class _HomeScreenState extends State<HomeScreen> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: Text("Flutter Direct Demo"),
        ),
        body: SingleChildScrollView(
            scrollDirection: Axis.vertical,
            child: Container(
              color: BgColor,
              height: MediaQuery.of(context).size.height,
              child: Padding(
                padding: const EdgeInsets.all(16.0),
                child: Column(
                  children: <Widget>[
                    ListTile(
                      trailing: Icon(Icons.arrow_forward_ios),
                      title: Text("Font Component"),
                      onTap: () {
                        Navigator.pushNamed(context, '/font');
                      },
                    ),
                    ListTile(
                      trailing: Icon(Icons.arrow_forward_ios),
                      title: Text("Color Component"),
                      onTap: () {
                        Navigator.pushNamed(context, '/color');
                      },
                    ),
                    ListTile(
                      trailing: Icon(Icons.arrow_forward_ios),
                      title: Text("Button Component"),
                      onTap: () {
                        Navigator.pushNamed(context, '/button');
                      },
                    ),
                    // ListTile(
                    //   trailing: Icon(Icons.arrow_forward_ios),
                    //   title: Text("Input Component"),
                    //   onTap: () {
                    //     Navigator.pushNamed(context, '/input');
                    //   },
                    // ),
                    // ListTile(
                    //   trailing: Icon(Icons.arrow_forward_ios),
                    //   title: Text("List Tile Component"),
                    //   onTap: () {
                    //     Navigator.pushNamed(context, '/listtile');
                    //   },
                    // ),
                    // ListTile(
                    //   trailing: Icon(Icons.arrow_forward_ios),
                    //   title: Text("Home Partner Portal"),
                    //   onTap: () {
                    //     Navigator.pushNamed(context, '/homepp');
                    //   },
                    // ),
                    // ListTile(
                    //   trailing: Icon(Icons.arrow_forward_ios),
                    //   title: Text("Home Partner Portal V5"),
                    //   onTap: () {
                    //     Navigator.pushNamed(context, '/homeppv5');
                    //   },
                    // ),
                    // ListTile(
                    //   trailing: Icon(Icons.arrow_forward_ios),
                    //   title: Text("Home Partner Portal V6"),
                    //   onTap: () {
                    //     Navigator.pushNamed(context, '/homeppv6');
                    //   },
                    // ),
                    // ListTile(
                    //   trailing: Icon(Icons.arrow_forward_ios),
                    //   title: Text("Inbox Partner Portal"),
                    //   onTap: () {
                    //     Navigator.pushNamed(context, '/inboxpp');
                    //   },
                    // ),
                    // ListTile(
                    //   trailing: Icon(Icons.arrow_forward_ios),
                    //   title: Text("Image Component"),
                    //   onTap: () {
                    //     Navigator.pushNamed(context, '/image');
                    //   },
                    // ),
                    // ListTile(
                    //   trailing: Icon(Icons.arrow_forward_ios),
                    //   title: Text("Grid Component"),
                    //   onTap: () {
                    //     Navigator.pushNamed(context, '/grid');
                    //   },
                    // )
                  ],
                ),
              ),
            )));
  }
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  flutter_direct: ^0.0.7+4

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:flutter_direct/flutter_direct.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
39
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
82
Overall:
Weighted score of the above. [more]
66
Learn more about scoring.

We analyzed this package on Apr 4, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.6
  • Flutter: 1.12.13+hotfix.8

Health suggestions

Fix lib/commons/atoms/custom_card_v2/atomic_custom_card_v2.dart. (-0.50 points)

Analysis of lib/commons/atoms/custom_card_v2/atomic_custom_card_v2.dart reported 1 hint:

line 38 col 18: Equality operator == invocation with references of unrelated types.

Format lib/commons/atoms/image/atomic_image.dart.

Run flutter format to format lib/commons/atoms/image/atomic_image.dart.

Format lib/commons/molecules/grid_view/molecule_grid_view.dart.

Run flutter format to format lib/commons/molecules/grid_view/molecule_grid_view.dart.

Maintenance suggestions

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

The package description is too short. (-8 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
carousel_slider ^1.3.0 1.4.1
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test