This file contains hidden or 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
| private func registerDefaultsFromSettingsBundle() | |
| { | |
| guard let settingsUrl = Bundle.main.url(forResource: "Settings", withExtension: "bundle")?.appendingPathComponent("Root.plist") else | |
| { return } | |
| guard let settingsPlist = NSDictionary(contentsOf: settingsUrl) else { return } | |
| guard let preferences = settingsPlist["PreferenceSpecifiers"] as? [NSDictionary] else { return } | |
| var defaultsToRegister = Dictionary<String, Any>() | |
| for preference in preferences { |
This file contains hidden or 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
| flutter pub run pigeon \ | |
| --input pigeons/configuration.dart \ | |
| --dart_out lib/native/configuration.dart \ | |
| --objc_header_out ios/Runner/configuration.h \ | |
| --objc_source_out ios/Runner/configuration.m |
This file contains hidden or 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
| { | |
| "dart.lineLength": 80, | |
| "docwriter.hotkey.mac": "⌥ + .", | |
| "editor.formatOnSave": true, | |
| "editor.formatOnPaste": true, | |
| "editor.fontFamily": "JetBrains Mono", | |
| "explorer.fileNesting.patterns": { | |
| "pubspec.yaml": ".flutter-plugins, .packages, .dart_tool, .flutter-plugins-dependencies, .metadata, .packages, pubspec.lock, build.yaml, analysis_options.yaml, all_lint_rules.yaml", | |
| ".gitignore": ".gitattributes, .gitmodules, .gitmessage, .mailmap, .git-blame*", | |
| "readme.*": "authors, backers.md, changelog*, citation*, code_of_conduct.md, codeowners, contributing.md, contributors, copying, credits, governance.md, history.md, license*, maintainers, readme*, security.md, sponsors.md", |
This file contains hidden or 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:http/http.dart' as http; | |
| import 'dart:convert'; | |
| void main() { | |
| addProduct(Product(description: 'vb10', | |
| id: '123', | |
| imageUrl: 'vb.png', | |
| isFavorite: true, | |
| price: '1200', | |
| title: 'Solution' |
This file contains hidden or 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
| class BaseFirebaseModel<T> { | |
| final String id; | |
| final T? data; | |
| BaseFirebaseModel({ | |
| required this.id, | |
| required this.data, | |
| }); | |
| } |
This file contains hidden or 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
| name: vb10 | |
| description: A new Flutter project. | |
| publish_to: "none" # Remove this line if you wish to publish to pub.dev | |
| version: 1.0.0+1 | |
| environment: | |
| sdk: ">=2.15.0 <3.0.0" | |
| dependencies: |
This file contains hidden or 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
| class User { | |
| final String firstName; | |
| User(this.firstName); | |
| static List<User> dummyUsers() { | |
| return [ | |
| User('veli'), | |
| User('bora'), | |
| ]; |
This file contains hidden or 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
| { | |
| Future<void> controlUser(String email, String password) async { | |
| if (!_changeValidateModel()) return; | |
| _changeLoading(); | |
| final response = await loginService.controlUser(model: LoginRequestModel(email: email, password: password)); | |
| _changeLoading(); | |
| await keepLocalUserResponse(response); | |
| _navigatePage(response); | |
| } |
This file contains hidden or 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
| Scaffold( | |
| appBar: AppBar(backgroundColor: Colors.transparent, elevation: 0, systemOverlayStyle: SystemUiOverlayStyle.dark), | |
| body: Padding( | |
| padding: context.paddingMedium, | |
| child: Form( | |
| key: formValidateKey, | |
| autovalidateMode: isAutoValidate ? AutovalidateMode.always : AutovalidateMode.disabled, | |
| child: Column( | |
| crossAxisAlignment: CrossAxisAlignment.start, | |
| children: [ |
This file contains hidden or 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
| class UserView2 extends StatelessWidget { | |
| const UserView2({Key? key}) : super(key: key); | |
| @override | |
| Widget build(BuildContext context) { | |
| return BlocProvider<UserCubit2>( | |
| create: (context) => UserCubit2(context, userService: FirebaseUserSerivice()), | |
| child: BlocConsumer<UserCubit2, UserState2>( | |
| listener: (context, state) { | |
| if (state.response != null) { |