Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ migrate_working_dir/
.packages
build/
/pubspec.lock
**/node_modules/
**/out/
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 3.0.0-beta-4

- Update README to reflect the VS Code extenion name change and to highlight the new features of the extension such as Quick Fix actions and Command Palette commands.

## 3.0.0-beta-3

- Update the example app name to reflect the new mission control theme.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ In your Flutter project, add the dependency to your `pubspec.yaml`.

```yaml
dependencies:
current: ^3.0.0-beta-3
current: ^3.0.0-beta-4
```

**Tip:** Consider installing the [Current Flutter Snippets](https://marketplace.visualstudio.com/items?itemName=ThirdVersionTechnologyLtd.current-flutter-snippets) extension in Visual Studio Code to make creating Current classes easier.
**Tip:** It is highly recommended to install the [Flutter Current](https://marketplace.visualstudio.com/items?itemName=ThirdVersionTechnologyLtd.current-flutter-snippets) extension in Visual Studio Code. It provides super helpful code snippets, commands, and Quick Fix actions to speed up your development workflow when using Flutter Current.

## Quick Start

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: current
description: A simple yet powerful state management library for Flutter. Keeps your widget build methods clean, with ZERO dependencies on other packages.
version: 3.0.0-beta-3
version: 3.0.0-beta-4
homepage: https://github.com/thirdversion/flutter_current
topics: [state-management, validation]
issue_tracker: https://github.com/thirdversion/flutter_current/issues
Expand Down
24 changes: 24 additions & 0 deletions vscode_extensions/current-flutter-snippets/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"@typescript-eslint/naming-convention": "warn",
"@typescript-eslint/semi": "warn",
"curly": "warn",
"eqeqeq": "warn",
"no-throw-literal": "warn",
"semi": "off"
},
"ignorePatterns": [
"out",
"dist",
"**/*.d.ts"
]
}
4 changes: 4 additions & 0 deletions vscode_extensions/current-flutter-snippets/.vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
.vscode-test/**
.gitignore
vsc-extension-quickstart.md
node_modules/**
src/**
tsconfig.json
.eslintrc.json
44 changes: 38 additions & 6 deletions vscode_extensions/current-flutter-snippets/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Current Flutter Snippets
# Flutter Current Extension

This extension contains Flutter code snippets for the [Current State Management package](https://pub.dev/packages/current).
This extension contains Flutter code snippets, commands and Quick Fix actions for the [Current State Management package](https://pub.dev/packages/current).

## Snippets

Expand All @@ -9,20 +9,52 @@ This extension contains Flutter code snippets for the [Current State Management
| `currentvm` | Create a new `CurrentViewModel` <br /><br /> ![currentvm example](https://github.com/thirdversion/flutter_current/raw/main/vscode_extensions/current-flutter-snippets/assets/current_view_model.gif) |
| `currentwidget` | Create a new `CurrentWidget`<br /><br /> ![currentwidget example](https://github.com/thirdversion/flutter_current/raw/main/vscode_extensions/current-flutter-snippets/assets/current_widget.gif) |

## Requirements
## Code Actions

| Action Name | Description |
| :--------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Add CurrentTextController Support | Adds the `CurrentTextControllersLifecycleMixin` to the State class and adds the necessary lifecycle method overrides to properly dispose of any `CurrentTextControllers` created in the widget. (Requires Current 3.0.0 or greater) |
| Scaffold CurrentWidget and ViewModel | When activated on an empty .dart file, scaffolds a new CurrentWidget and CurrentViewModel with the necessary boilerplate to get started. |
| Add CurrentProperty to currentProps list | When activated on a CurrentProperty, adds the property to the CurrentViewModel's `currentProps` list. |
| Add missing CurrentProperties to list | When activated on the `currentProps` list in a CurrentViewModel, adds any missing CurrentProperty fields to the list. |
| Convert to CurrentWidget | When activated on a regular StatefulWidget or StatelessWidget, converts it to a CurrentWidget. |

## Commands

| Command Name | Description |
| :----------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Scaffold CurrentWidget and ViewModel | Prompts you for a file name and design language (material or cupertino) and creates a new CurrentWidget and CurrentViewModel with the necessary boilerplate to get started. If you are using Current 3.0.0 or greater, will also be presented with an option to create a CurrentWidget with CurrentTextController support. |

Dart version 3.0.0 or greater.
## Context Menu

Flutter version 3.0.0 or greater.
When right-clicking on a folder in the VS Explorer pane, there is now an option to create new CurrentWidget and ViewModel files in that folder. This will prompt you for a file name and design language (material or cupertino) and creates a new CurrentWidget and CurrentViewModel with the necessary boilerplate to get started. If you are using Current 3.0.0 or greater, will also be presented with an option to create a CurrentWidget with CurrentTextController support.

A reference to Current version 2.0.0 or greater in your pubspec.yaml.
## Requirements

Flutter version 3.38.0 or greater.

Minimum supported Current version 2.0.0, however 3.0.0 or greater is recommended to get the most out of this extension as many of the new features of this extension require Current 3.0.0.

## Reporting issues

If you discover any issues with this extension please file an issue on the [Current](https://github.com/thirdversion/flutter_current/issues) repository.

## Release Notes

### 2.0.0

- Updated extension name and description to better reflect available features
- Minor updates to existing snippets so the cursor ends up in a more intuitive place after insertion
- Added new Command Palette command to create a new CurrentWidget and View Model. Will prompt you for a file name and design language (material or cupertino). If you are using Current 3.0.0 or greater, will also be presented with an option to create a CurrentWidget with CurrentTextController support.
- Added a Context Menu option when right-clicking on a folder in the VS Explorer pane to create new CurrentWidget and ViewModel files in that folder.
- Added several VS Quick Code Actions have been added. These can be activated using your Quick Fix keyboard shortcut and your cursor is:
1. On an empty .dart file, scaffold a new CurrentWidget and CurrentViewModel with the necessary boilerplate to get started.
1. On a CurrentProperty, add the property to the CurrentViewModel's `currentProps` list.
1. On the `currentProps` list in a CurrentViewModel, add any missing CurrentProperty fields to the list.
1. On a regular StatefulWidget or StatelessWidget, convert it to a CurrentWidget.
1. On a CurrentState class declaration, add the `CurrentTextControllersLifecycleMixin` to the class declaration and add the necessary lifecycle method overrides. (Requires Current 3.0.0 or greater)
1. On a CurrentTextController, bind the controller to a property and add to the bindCurrentControllers method automatically. (Requires Current 3.0.0 or greater)

### 1.0.0

Initial release of Current Flutter Snippets.
Loading
Loading