Membuat Tasbih Digital dengan Flutter BLoC

Membuat Tasbih Digital dengan Flutter BLoC

Flutter.id – Assalamualaikum, ini adalah tutorial pertama mengenai bloc di flutter, BLoC – Bussiness Logic Component merupakan design pattern yang bisa dipakai di Flutter. Ok, lanjut kita buat project nya.

buat project dengan nama : flutter_bloc

Tambahkan package di pubspec.yaml

name: flutter_bloc
description: A new Flutter project.

version: 1.0.0+1

environment:
  sdk: ">=2.1.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter

  cupertino_icons: ^0.1.2
  bloc: ^0.15.0

dev_dependencies:
  flutter_test:
    sdk: flutter


flutter:
  uses-material-design: true

  assets:
  - images/

Tambahkan Folder Image dan gambar didalam folder

kabah.jpg

Buat Folder Tasbih di Folder Lib

Tambahkan File

  1. Tasbih.dart
  2. TasbihBloc.dart
  3. TasbihProvider.dart

TasbihProvider.dart

TasbihBloc.dart

Tasbih.dart

main.dart

Hasil Aplikasi nya :

Kamu bisa download di github

flutterdotid/flutter_bloc

A new Flutter project. http://flutter.id/web/membuat-tasbih-digital-dengan-flutter-bloc/#/ This project is a starting point for a Flutter application. A few resources to get you started if this is your first Flutter project: For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Flutter Developer