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:firebase_analytics/firebase_analytics.dart'; | |
| import 'package:flutterfirebaseapp/errors/failure.dart'; | |
| abstract class AnalyticsService { | |
| /// If analytics is supported on the current platform. | |
| Future<void> initAnalytics(); | |
| /// If analytics is supported on the current platform. | |
| Future<bool> isSupported(); |
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 'dart:isolate'; | |
| import 'package:firebase_crashlytics/firebase_crashlytics.dart'; | |
| import 'package:flutter/foundation.dart'; | |
| class CrashlytcsService { | |
| static Future<void> initializeFlutterFire() async { | |
| try { | |
| // Ativa o Crashlytics apenas no modo release. | |
| await FirebaseCrashlytics.instance |
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
| main() { | |
| print(multiplicaNumeros(3, 5)); | |
| print(construirNomeCompleto('Ian', 'Oliveira')); | |
| print(construirNomeCompletoOpcional(nome: 'Ian')); | |
| print(descreverCidade('Ian')); | |
| print(descreverCidade('Parnaiba', 'brasil')); | |
| print(quadrado(3)); | |
| print(quadradoArrowFunction(3)); | |
| print(aplicarOperacao(20, 30, soma)); |
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 'dart:math'; | |
| import 'package:flutter/material.dart'; | |
| class SliverAppBarStatus extends StatefulWidget { | |
| const SliverAppBarStatus({Key? key}) : super(key: key); | |
| @override | |
| _SliverAppBarStatusState createState() => _SliverAppBarStatusState(); | |
| } |
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
| void abrirInstagram() async { | |
| var messengerUrl = 'https://instagram.com/ianoliveira.dev'; | |
| if (await canLaunchUrl(Uri.parse(messengerUrl))) { | |
| await launchUrl(Uri.parse(messengerUrl)); | |
| } else { | |
| throw 'Could not launch $messengerUrl'; | |
| } | |
| } |
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:firebase_core/firebase_core.dart'; | |
| import 'package:firebase_messaging/firebase_messaging.dart'; | |
| import 'package:flutter/cupertino.dart'; | |
| import 'package:flutter/material.dart'; | |
| import 'package:flutter_local_notifications/flutter_local_notifications.dart'; | |
| import 'package:rxdart/subjects.dart'; | |
| class NotificationsService { | |
| NotificationsService() { | |
| _init(); |
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:flutter/material.dart'; | |
| import 'package:flutter_mobx/flutter_mobx.dart'; | |
| import 'package:flutter_modular/flutter_modular.dart'; | |
| import 'home_controller.dart'; | |
| class HomePage extends StatefulWidget { | |
| HomePage({Key? key}) : super(key: key); |
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:mobx/mobx.dart'; | |
| import 'package:flutter_hasura_app_example/app/modules/home/models/car_model.dart'; | |
| import 'package:flutter_hasura_app_example/app/modules/home/repositories/car_repository.dart'; | |
| part 'home_controller.g.dart'; | |
| class HomeController = _HomeControllerBase with _$HomeController; | |
| abstract class _HomeControllerBase with Store { |
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:hasura_connect/hasura_connect.dart'; | |
| import 'package:flutter_hasura_app_example/app/modules/home/models/car_model.dart'; | |
| class CarRepository { | |
| final HasuraConnect _hasuraConnect; | |
| CarRepository(this._hasuraConnect); | |
| Future<List<CarModel>> getCars() async { | |
| List<CarModel> listCars = []; |
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 CarModel { | |
| CarModel({ | |
| required this.id, | |
| required this.name, | |
| required this.description, | |
| }); | |
| final int id; | |
| final String name; | |
| final String description; |
NewerOlder