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
| library firebase_storage_service; | |
| import 'dart:io'; | |
| import 'package:firebase_storage/firebase_storage.dart' as firebase_storage; | |
| class FirebaseStorageService { | |
| FirebaseStorageService._(); | |
| static final instance = FirebaseStorageService._(); |
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
| ; Script generated by the Inno Setup Script Wizard. | |
| ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! | |
| #define MyAppName "sidekick" | |
| #define MyAppVersion "0.0.6" | |
| #define MyAppPublisher "Leo Farias" | |
| #define MyAppURL "https://github.com/leoafarias/sidekick" | |
| #define MyAppExeName "Sidekick.exe" | |
| [Setup] |
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 sendFeedbackToEmail(String userFeedback) async { | |
| final _dio = Dio(); | |
| final _baseUrl = 'https://maker.ifttt.com/trigger/'; | |
| final _webHookKey = ''; // replace with your webhook key | |
| // grab IFTTT event to trigger | |
| // TODO: replace with your eventName | |
| final String eventName = 'feedback'; | |
| final String url = _baseUrl + eventName + '/with/key/' + _webHookKey; |
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 create feedback_app |
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
| dependencies: | |
| flutter: | |
| sdk: flutter | |
| dio: ^3.0.10 |
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
| // (..) | |
| // skipped for simplicity | |
| TextEditingController controller = TextEditingController(); | |
| @override | |
| Widget build(BuildContext context) { | |
| return Scaffold( | |
| appBar: AppBar( | |
| title: Text('Flutter IFTTT'), | |
| ), |
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 AuthController extends MomentumController { | |
| // ... (skipped for simplicity) | |
| Future loginUser() async { | |
| // grab the service | |
| final _authService = service(); | |
| // you can now call any method of the service | |
| var isLogged = await _authService.isUserLoggedIn(); | |
| } | |
| } |
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
| // enum of event action to easily determine event action fired and received | |
| enum AuthEventAction { | |
| None, | |
| Success, | |
| Fail, | |
| Error, | |
| } | |
| // event class | |
| class AuthEvent { |
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
| // (..) omitted for simplicity | |
| @override | |
| void initMomentumState() { | |
| var _controller = Momentum.controller(context); | |
| // listen for auth events | |
| _controller.listen( | |
| state: this, | |
| invoke: (event) { |
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 ApiService extends MomentumService { | |
| Future isUserLoggedIn() async { | |
| var result = await makeReq(); | |
| return result; | |
| } | |
| Future register(User user) async { | |
| await http.post('url', data: user.toMap()); | |
| } | |
| } |
NewerOlder