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_riverpod/flutter_riverpod.dart'; | |
import 'package:location/location.dart'; | |
final landingViewProvider = | |
StateNotifierProvider<LandingViewModel, bool>((ref) => LandingViewModel()); | |
class LandingViewModel extends StateNotifier<bool> { | |
LandingViewModel() : super(false); | |
Future<bool> getUserLocation() async { |
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
final weatherServiceProvider = Provider((ref) => WeatherServiceImpl()); | |
abstract class WeatherService { | |
Future getWeather(WeatherModel model); | |
} | |
class WeatherServiceImpl extends WeatherService { | |
final _client = Client(); | |
const baseUrl = "https://api.openweathermap.org/data/"; | |
const version = '2.5/'; |
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
class WeatherModel { | |
final double latitude; | |
final double longitude; | |
WeatherModel({ | |
required this.latitude, | |
required this.longitude, | |
}); | |
} | |
class WeatherResponseModel { |
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'; | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({Key? key}) : super(key: key); | |
@override |
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
class CreateTransactionPin extends StatefulWidget { | |
const CreateTransactionPin({Key? key}) : super(key: key); | |
@override | |
State<CreateTransactionPin> createState() => _CreateTransactionPinState(); | |
} | |
class _CreateTransactionPinState extends State<CreateTransactionPin> { | |
String field1 = ''; | |
String field2 = ''; |
NewerOlder