https://github.com/surfstudio/surf_flutter_starter
Made by Surf 🏄
https://github.com/surfstudio/surf_flutter_starter
Last synced: about 2 months ago
JSON representation
Made by Surf 🏄
- Host: GitHub
- URL: https://github.com/surfstudio/surf_flutter_starter
- Owner: surfstudio
- License: apache-2.0
- Created: 2022-03-04T08:32:05.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-17T06:54:48.000Z (over 1 year ago)
- Last Synced: 2025-04-13T07:13:20.666Z (6 months ago)
- Language: Dart
- Homepage:
- Size: 2.27 MB
- Stars: 8
- Watchers: 4
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Flutter Starter
![]()
## Overview
surf_flutter_starter is a CLI tool for fast and easy creation of Flutter projects.
## Usage
To activate Flutter Starter, you have to add it to pub:
```sh
dart pub global activate surf_flutter_starter
```and then run
```sh
dart pub global run surf_flutter_starter create
```Dialog prompts will appear to follow project creation process.
## Features
Flutter project creation based on surf template().
For the time being, it can change:- Project name.
- App ID.
- App Label.## Getting started
Help in general:
```sh
CLI-tool for creating new Flutter projects, based on surf-flutter-app-templateUsage: surf_flutter_starter [arguments]
Global options:
-h, --help Print this usage information.
-v, --verbose Print verbose outputAvailable commands:
create Creates new Flutter project based on Surf project template```
Create command:
```sh
Usage: surf_flutter_starter create
-h, --help Print this usage information.
-c, --config-path Specify where config.json file is located.
```## CLI Architecture
### Jobs
Regular Job:
```dart
/// Atomic task, which does something and returns `Object?` on completion.
///
/// [Job]'s are used for project generation process. They are top-level entities,
/// which define several technical steps of creating new project. [Job]'s are
/// expandable. Meaning, that series of more [Job]'s can create more complex
/// structure.
abstract class Job {
/// Executes specific task for project template creation.
///
/// Returns `Object?`
Future execute();
}
```Configurable Job:
```dart
/// [Job] requires [Config], as project-describing entity.
abstract class ConfigurableJob extends Job {
/// Instance of [Config].
///
/// Holds [Job]-specific instance of [Config], required for
/// [Job.execute] & project creation process.
late final Config config;/// Sets up [Job] before its' [Job.execute].
///
/// Requires [Config].
void setupJob(Config config) {
this.config = config;
}
}
```### Config
Config is a set of parameters, which specify project, that is being created.
```dart
/// Describes new project, that is being created.
///
/// Consists of values & parameters, that are being inserted
/// into new project when it's being created by user. User
/// defines those values & parameters as [ConfigParameter]s
/// whilst interacting with CLI.
class Config {
/// ...
}
```## How to reach us
Please feel free to ask any questions about this package. Join our community chat on Telegram. We speak English and Russian.
[](https://t.me/SurfGear)