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
import 'package:equatable/equatable.dart'; | |
import 'package:flutter_bloc/flutter_bloc.dart'; | |
import 'package:meta/meta.dart'; | |
part '$statefile$'; | |
class $cubitName$Cubit extends Cubit<$cubitName$State> { | |
final $repositoryName$ _repository; | |
$cubitName$Cubit(this._repository) : super($cubitName$Initial()); | |
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
part of '$cubitname$.dart'; | |
@immutable | |
abstract class $blocName$State extends Equatable{ | |
@override | |
List<Object?> get props => []; | |
} | |
class $blocName$Initial extends $blocName$State {} |
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
import 'package:freezed_annotation/freezed_annotation.dart'; | |
import 'package:flutter/foundation.dart'; | |
part '$filename$.freezed.dart'; | |
part '$filename$.g.dart'; | |
@freezed | |
class $className$ with _$$$className${ | |
const factory $className$({ | |
$end$ |
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
import 'package:flutter/material.dart'; | |
class $WidgetName$ extends StatelessWidget { | |
const $WidgetName$({super.key}); | |
@override | |
Widget build(BuildContext context) { | |
return Container($END$); | |
} |
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
void main() { | |
final start = DateTime.now(); | |
var a = findRepeatationOfCharacter('aaassdsdssasdasda'); | |
final end = DateTime.now(); | |
print(end.difference(start).inMilliseconds ); | |
print(end.difference(start).inMicroseconds ); | |
print(a); | |
} |
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
CustomDropDownFormField<String>( | |
validator: (value) => | |
(value?.isNotEmpty ?? false) ? null : "Cannot be null", | |
items: AppConstant.timeOptions | |
.map((e) => DropdownMenuItem( | |
child: Text(e), | |
value: e, | |
)) | |
.toList(), | |
) |
NewerOlder