Skip to content

Commit

Permalink
Merge pull request #8 from fe-homecredit-id/development
Browse files Browse the repository at this point in the history
Development Naiso!
  • Loading branch information
satriantorobimo committed Sep 10, 2019
2 parents 5bef98e + c5be72f commit f0fb76f
Show file tree
Hide file tree
Showing 10 changed files with 87 additions and 19 deletions.
6 changes: 2 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
## [0.0.5+1] - Release
## [0.0.5+2] - Release

* Change Fontweight to dynamic
* Remove FontBold
* Fix minnor issue
* Add font appbar

## [0.0.5] - Release

Expand Down
36 changes: 27 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,32 @@
# flutter_direct

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

## Getting Started
## Usage

This project is a starting point for a Dart
[package](https://flutter.dev/developing-packages/),
a library module containing code that can be shared easily across
multiple Flutter or Dart projects.
To use this plugin, add flutter_direct as a [dependency in your pubspec.yaml file](https://flutter.dev/docs/development/packages-and-plugins/using-packages).

For help getting started with Flutter, view our
[online documentation](https://flutter.dev/docs), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
### Example


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

```dart
Container(
height: 80,
width: double.infinity,
color: AtomicColor.primaryColor,
child: Center(
child: Text(
"Secondary Color",
style: TextStyle(color: Colors.white),
)),
),
AtomicInput(
keyValue: 'password',
hintText: 'PASSWORD',
inputType: InputType.Authentication,
formType: FormType.Password,
),
```
2 changes: 1 addition & 1 deletion example/lib/component_list/color_component.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class ColorComponent extends StatelessWidget {
Container(
height: 80,
width: double.infinity,
color: AtomicColor.secondaryColor,
color: AtomicColor.primaryColor,
child: Center(
child: Text(
"Secondary Color",
Expand Down
9 changes: 9 additions & 0 deletions example/lib/component_list/typography_component.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,15 @@ class TypographyComponent extends StatelessWidget {
data: 'Raleway - Caption',
),
),
Container(
padding: EdgeInsets.symmetric(horizontal: 16),
child: AtomicFontAppbar(
data: "Pesan",
size: 22,
fontWeight: FontWeight.bold,
color: AtomicColor.primaryColor,
),
),
],
),
)),
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.0.5+1"
version: "0.0.5+2"
flutter_slidable:
dependency: "direct main"
description:
Expand Down
2 changes: 1 addition & 1 deletion lib/commons/atoms/buttons/atomic_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class AtomicButton extends StatelessWidget {
return AtomicColor.primaryColor;
break;
case ButtonType.Secondary:
return AtomicColor.secondaryColor;
return AtomicColor.primaryColor;
break;
case ButtonType.Disable:
return AtomicColor.disableColor;
Expand Down
5 changes: 3 additions & 2 deletions lib/commons/atoms/color/atomic_color.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ part of flutter_direct;
class AtomicColor {
AtomicColor._();

static const Color primaryColor = Color(0xFF404040);
static const Color secondaryColor = Color(0xFFE11931);
static const Color primaryColor = Color(0xFFE11931);
static const Color disableColor = Color(0xFFA9A9A9);
static const Color bgColor = Color(0xFFFFFFFF);


}
40 changes: 40 additions & 0 deletions lib/commons/atoms/font/atomic_font_appbar.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
part of flutter_direct;

class AtomicFontAppbar extends StatelessWidget {
final String data;
final String keyValue;
final double size;
final Color color;
final FontWeight fontWeight;

AtomicFontAppbar({
this.data,
this.keyValue,
this.size,
this.color,
this.fontWeight
});

@override
Widget build(BuildContext context) {
return Text(
data ?? 'null',
key: Key(keyValue ?? ''),
overflow:
TextOverflow.ellipsis,
textAlign: TextAlign.left,
strutStyle: StrutStyle(
height: 1.0,
),
textScaleFactor: 1.0,
style: TextStyle(
fontFamily: "Campton",
fontSize: size ?? 18,
color: color ?? Colors.green,
fontWeight: fontWeight,
),
);
}


}
2 changes: 2 additions & 0 deletions lib/flutter_direct.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ part 'commons/atoms/buttons/atomic_button.dart';
part 'commons/atoms/color/atomic_color.dart';
part 'commons/atoms/font/atomic_font.dart';
part 'commons/atoms/font/atomic_typography.dart';
part 'commons/atoms/font/atomic_font_appbar.dart';

part 'commons/atoms/image/atomic_image.dart';
part 'commons/atoms/custom_card/atomic_custom_card.dart';
part 'commons/atoms/custom_card_v2/atomic_custom_card_v2.dart';
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_direct
description: Design System for Home Credit Indonesia Tippers App.
version: 0.0.5+1
version: 0.0.5+2
author: dopefaceee, satriantorobimo & arlakay
homepage: https://github.com/fe-homecredit-id/flutter-direct

Expand Down

0 comments on commit f0fb76f

Please sign in to comment.