Boilerplate codes including Superbase settings for Flutter

Overview

flutter_boilerplate_supabase

Boilerplate codes including Superbase settings for Flutter.

Flutter

Getting Started

You have to create the .env file.

Rename the .env_example file to .env.

cp .env_example .env
flutter pub get
flutter run

Specification

  • Supabase settings
  • Localization
  • Get package navigation settings
  • Asset-related settings (Image, Icon, Color)
  • Installed test packages
  • Installed test packages
  • Installed the flutter_env package
  • Installed the logger package

Folder Structures

├── android
├── build
├── ios
├── lib
│   ├── generated
│   │   ├── intl
│   │   │   ├── messages_all.dart
│   │   │   ├── messages_en.dart
│   │   │   └── messages_ko.dart
│   │   └── l10n.dart
│   ├── l10n
│   │   ├── intl_en.arb
│   │   └── intl_ko.arb
│   ├── main.dart
│   ├── models
│   │   └── sample.dart
│   ├── screens // <- or pages
│   │   └── home.dart
│   ├── utils
│   │   ├── asset.dart
│   │   └── logger.dart
│   └── widgets // <- or components
│       └── sample.dart
├── res
│   ├── icons
│   │   └── logo.png
│   ├── images
│   │   └── logo.png
│   ├── fonts // <- If you want, you have to make it here yourself.
├── test
│   └── widget_test.dart
├── analysis_options.yaml
├── flutter_boilerplate.iml
├── pubspec.lock
├── pubspec.yaml
├──.env // <- Rename the .env_example file to .env.
└── README.md

Dependencies

# dev_dependencies
test: ^1.17.12
mockito: ^5.0.17
build_runner: ^2.1.7
integration_test: ^0.8.1

# dependencies
cupertino_icons: ^1.0.2
intl: ^0.17.0
supabase_flutter: ^0.2.9
get: ^4.6.1
flutter_dotenv: ^5.0.2
logger: ^1.1.0

Localization

The repository is localizing using the arb recommended on the official Flutter website.

To use it, you need to install the Flutter Intl extension in your VSCode or Android studio.

You can go to the link below for installation.

When Flutter Intl is installed, a dart file is automatically created when modifying the arb file.

For posture information on this, check the document on the download link. For Korean users, you can check it on this link.

How to use localization

import 'package:intl/intl.dart';
...

Text(Intl.message('appName'))

or

import 'package:flutter_boilerplate/generated/l10n.dart';
...

Text(S.of(context))

Assets

The following related things are called Assets.

  • Images
  • Icons
  • Fonts

Things related to assets are created under the res folder.

└── res
    ├── icons
    │   └── logo.png
    ├── images
    │   └── logo.png
    └── fonts // <- If you want, you have to make it here yourself.

How to use asset

To use the image or icon, you can use it as below.

import 'package:flutter_boilerplate/utils/asset.dart' as asset;
...

Image(
  image: asset.Images.logo,
)

Environment variables

This project has a flutter_dotenv installed. Enter the environmental variable you want in the .env file as follows.

FOO=foo
BAR=bar
FOOBAR=$FOO$BAR
ESCAPED_DOLLAR_SIGN='$1000'
# This is a comment

How to use

import 'package:flutter_dotenv/flutter_dotenv.dart';

dotenv.get('FOO');

Logging

This project has a logger installed

logger.d('Log message with 2 methods');
logger.i('Info message');
logger.w('Just a warning!');
logger.e('Error! Something bad happened');

logger

You might also like...

A port of kotlin-stdlib for Dart/Flutter including immutable collections (KtList, KtMap, KtSet) and other packages

A port of kotlin-stdlib for Dart/Flutter including immutable collections (KtList, KtMap, KtSet) and other packages

kt.dart This project is a port of Kotlin's Kotlin Standard library for Dart/Flutter projects. It's a useful addition to dart:core and includes collect

Jan 9, 2023

CARP Mobile Sensing for Flutter, including mobile sensing framework, data backend support, and the CARP mobile sensing app.

CARP Mobile Sensing for Flutter, including mobile sensing framework, data backend support, and the CARP mobile sensing app.

This repo hold the source code for the CACHET Research Platform (CARP) Mobile Sensing (CAMS) Flutter software. It contains the source code for CACHET

Dec 16, 2022

Building a simple Flutter app * Switch Theme * for understanding the BLoC State Management including: Cubit Communications with StreamSubscription & Managing Route.

Building a simple Flutter app * Switch Theme * for understanding the BLoC State Management including: Cubit Communications with StreamSubscription & Managing Route.

Oct 3, 2022

A iOS like table view including section, row, section header and divider

A iOS like table view including section, row, section header and divider

flutter_section_table_view A iOS like table view including section, row, section header and divider Support both Android and iOS Support drop-down ref

Nov 4, 2022

An app to show everything bus related in Singapore, including arrival times and a directory

An app to show everything bus related in Singapore, including arrival times and a directory

NextBus SG An app to show everything bus related in Singapore, including bus arrival times and a directory, with extra features. 🎆 Gallery Click here

Sep 13, 2022

A Flutter widget to create an iOS settings-table (static TableView).

A Flutter widget to create an iOS settings-table (static TableView).

flutter_cupertino_settings A Flutter widget to create an iOS settings-table (static TableView). import 'package:flutter_cupertino_settings/flutter_cup

Dec 28, 2022

An Ubuntu desktop settings app made with Flutter

An Ubuntu desktop settings app made with Flutter

unofficial Ubuntu Desktop Settings App made with Flutter - WIP TODO use real yaru icons - thanks to @Jupi007 improve layout implement settings search

Dec 15, 2022

A Flutter repo with a ready-to-go architecture containing flavors, bloc, device settings, json serialization and connectivity

A Flutter repo with a ready-to-go architecture containing flavors, bloc, device settings, json serialization and connectivity

Flutter Ready to Go A Flutter repo with a ready-to-go architecture containing flavors, bloc, device settings, json serialization and connectivity. Why

Nov 11, 2022

Flutter settings manager built on top of Shared Preferences

Settings Manager Flutter settings store built on top of shared preferences. Code Generator for supported types Usage import 'dart:async'; import 'pac

Dec 13, 2022
Owner
Flutter Seoul
Flutter Seoul
This is an open source Tips & Tricks for Flutter, that helps flutter Developers write simple but powerful dart codes.

Showcasing-flutter - This is an open source Tips & Tricks for Flutter, that helps flutter Developers write simple but powerful dart codes.

Paul Edeme'kong - Flutter Fairy 1 Jan 4, 2022
The codes written while teaching Dart lessons in Flutter Fest

dart_lessons Flutter Fest etkinliğinde Dart dersleri anlatılırken yazılmış kodla

Çağla Betül Sezer 12 Aug 28, 2022
This is a template repository for starting flutter apps with some pre build codes.

flutter_mobile_template A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you

Mazharul Sabbir 5 Nov 16, 2022
Flutter pokedex - All codes related to the project are completed.

flutter_pokedex It is development work for Flutter tutorial. Getting Started A few required resources to get you test this Flutter project: Models : T

Umutcan 0 Jan 2, 2022
Symbolic names for character codes in Dart

Character code constants This package can generate constant symbolic names for character codes. The constants can used when working directly with char

Lasse R.H. Nielsen 21 Sep 16, 2022
Mobile app for enroll paid udemy courses using coupen codes

BookMyCourse An android app where you will find ALL free courses of Udemy in an easy and quick way. Show some ❤️ and ⭐ the repo to encourage the proje

ARUN BALAJI 11 Oct 31, 2022
An TOTP codes generator for 2FA

otp_generator This is a full mobile and multiplatform application that allow you to generate TOTP codes using secret keys or scanning the QR code offe

null 3 Dec 18, 2022
📅 Customizable flutter calendar widget including day and week views

?? Customizable, animated calendar widget including day, week, and month views. Navigation Animation Callbacks Changing the VisibleDateRange Available

Jonas Wanke 276 Jan 1, 2023
Flutter mobile app with firestore authentication including Email and Social auth.

Flutter mobile app with firestore authentication including Email and Social auth.

Ionicfirebaseapp 96 Dec 7, 2022
Building a simple Flutter app for understanding the BLoC State Management including: Cubit, Managing Route & showSnackBar.

Building a simple Flutter app for understanding the BLoC State Management including: Cubit, Managing Route & showSnackBar.

TAD 8 Dec 3, 2022