-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1405 from KRTirtho/dev
Release version 3.6.0
- Loading branch information
Showing
326 changed files
with
12,224 additions
and
6,486 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,170 @@ | ||
{ | ||
"PaginatedState": { | ||
"scope": "dart", | ||
"prefix": "paginatedState", | ||
"description": "Generate a PaginatedState", | ||
"body": [ | ||
"class ${1:Model}State extends PaginatedState<${2:Model}> {", | ||
" ${1:Model}State({", | ||
" required super.items,", | ||
" required super.offset,", | ||
" required super.limit,", | ||
" required super.hasMore,", | ||
" });", | ||
" ", | ||
" @override", | ||
" ${1:Model}State copyWith({", | ||
" List<${2:Model}>? items,", | ||
" int? offset,", | ||
" int? limit,", | ||
" bool? hasMore,", | ||
" }) {", | ||
" return ${1:Model}State(", | ||
" items: items ?? this.items,", | ||
" offset: offset ?? this.offset,", | ||
" limit: limit ?? this.limit,", | ||
" hasMore: hasMore ?? this.hasMore,", | ||
" );", | ||
" }", | ||
"}" | ||
] | ||
}, | ||
"PaginatedAsyncNotifier": { | ||
"scope": "dart", | ||
"prefix": "paginatedAsyncNotifier", | ||
"description": "Generate a PaginatedAsyncNotifier", | ||
"body": [ | ||
"class ${1:NotifierName}Notifier extends PaginatedAsyncNotifier<${3:Item}, ${2:Model}State> {", | ||
" ${1:NotifierName}Notifier() : super();", | ||
" ", | ||
" @override", | ||
" fetch(int offset, int limit) async {", | ||
" throw UnimplementedError();", | ||
" }", | ||
" ", | ||
" @override", | ||
" build() async {", | ||
" throw UnimplementedError();", | ||
" }", | ||
"}" | ||
] | ||
}, | ||
"PaginaitedNotifierWithState": { | ||
"scope": "dart", | ||
"prefix": "paginatedNotifierWithState", | ||
"description": "Generate a PaginatedNotifier with PaginatedState", | ||
"body": [ | ||
"class $1State extends PaginatedState<$2> {", | ||
" $1State({", | ||
" required super.items,", | ||
" required super.offset,", | ||
" required super.limit,", | ||
" required super.hasMore,", | ||
" });", | ||
" ", | ||
" @override", | ||
" $1State copyWith({", | ||
" List<$2>? items,", | ||
" int? offset,", | ||
" int? limit,", | ||
" bool? hasMore,", | ||
" }) {", | ||
" return $1State(", | ||
" items: items ?? this.items,", | ||
" offset: offset ?? this.offset,", | ||
" limit: limit ?? this.limit,", | ||
" hasMore: hasMore ?? this.hasMore,", | ||
" );", | ||
" }", | ||
"}", | ||
" ", | ||
"class $1Notifier", | ||
" extends PaginatedAsyncNotifier<$2, $1State> {", | ||
" $1Notifier() : super();", | ||
" ", | ||
" @override", | ||
" fetch(int offset, int limit) async {", | ||
" throw UnimplementedError();", | ||
" }", | ||
" ", | ||
" @override", | ||
" build() async {", | ||
" throw UnimplementedError();", | ||
" }", | ||
"}", | ||
" ", | ||
"final ${1/(.*)/${1:/camelcase}/}Provider = AsyncNotifierProvider<$1Notifier, $1State>(", | ||
" ()=> $1Notifier(),", | ||
");" | ||
] | ||
}, | ||
"FamilyPaginatedAsyncNotifier": { | ||
"scope": "dart", | ||
"prefix": "familyPaginatedAsyncNotifier", | ||
"description": "Generate a FamilyPaginatedAsyncNotifier", | ||
"body": [ | ||
"class ${1:NotifierName}Notifier extends FamilyPaginatedAsyncNotifier<${3:Item}, ${2:Model}State, {$4:Arg}> {", | ||
" ${1:NotifierName}Notifier() : super();", | ||
" ", | ||
" @override", | ||
" fetch(arg, offset, limit) async {", | ||
" throw UnimplementedError();", | ||
" }", | ||
" ", | ||
" @override", | ||
" build(arg) async {", | ||
" throw UnimplementedError();", | ||
" }", | ||
"}" | ||
] | ||
}, | ||
"FamilyPaginaitedNotifierWithState": { | ||
"scope": "dart", | ||
"prefix": "familyPaginatedNotifierWithState", | ||
"description": "Generate a FamilyPaginatedAsyncNotifier with PaginatedState", | ||
"body": [ | ||
"class $1State extends PaginatedState<$2> {", | ||
" $1State({", | ||
" required super.items,", | ||
" required super.offset,", | ||
" required super.limit,", | ||
" required super.hasMore,", | ||
" });", | ||
" ", | ||
" @override", | ||
" $1State copyWith({", | ||
" List<$2>? items,", | ||
" int? offset,", | ||
" int? limit,", | ||
" bool? hasMore,", | ||
" }) {", | ||
" return $1State(", | ||
" items: items ?? this.items,", | ||
" offset: offset ?? this.offset,", | ||
" limit: limit ?? this.limit,", | ||
" hasMore: hasMore ?? this.hasMore,", | ||
" );", | ||
" }", | ||
"}", | ||
" ", | ||
"class $1Notifier", | ||
" extends FamilyPaginatedAsyncNotifier<$2, $1State, $3> {", | ||
" $1Notifier() : super();", | ||
" ", | ||
" @override", | ||
" fetch(arg, offset, limit) async {", | ||
" throw UnimplementedError();", | ||
" }", | ||
" ", | ||
" @override", | ||
" build(arg) async {", | ||
" throw UnimplementedError();", | ||
" }", | ||
"}", | ||
" ", | ||
"final ${1/(.*)/${1:/camelcase}/}Provider = AsyncNotifierProviderFamily<$1Notifier, $1State, $3>(", | ||
" ()=> $1Notifier(),", | ||
");" | ||
] | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.