Ejemplos de datos en Firestore
Colección users:
{
"id": "uid1234",
"username": "johndoe",
"email": "[email protected]",
"photoUrl": "https://example.com/photo.jpg"
Ejemplos de datos en Firestore
Colección users:
{
"id": "uid1234",
"username": "johndoe",
"email": "[email protected]",
"photoUrl": "https://example.com/photo.jpg"
void main() { | |
final list = List.generate(10000, (index) => index); | |
imperative(list); | |
declarative(list); | |
} | |
void imperative(List<int> list) { | |
final start = DateTime.now(); | |
int result = 0; |
import 'package:flutter/material.dart'; | |
import 'package:flutter_meedu/meedu.dart'; | |
import 'package:flutter_meedu/ui.dart'; | |
typedef CounterState = State<int>; | |
class CounterController extends SimpleNotifier with StateMixin<int> { | |
CounterController() { | |
/// initState must be calle before any state update | |
initState( |
{ | |
"[dart]": { | |
"editor.formatOnSave": true, | |
"editor.formatOnType": true, | |
"editor.rulers": [], | |
"editor.selectionHighlight": false, | |
"editor.suggest.snippetsPreventQuickSuggestions": false, | |
"editor.suggestSelection": "first", | |
"editor.tabCompletion": "onlySnippets", | |
"editor.wordBasedSuggestions": false |
[ | |
{ | |
"name": "Afghanistan", | |
"dial_code": "+93", | |
"code": "AF" | |
}, | |
{ | |
"name": "Aland Islands", | |
"dial_code": "+358", | |
"code": "AX" |
import 'package:flutter/material.dart'; | |
class WithBottomScrollableContent extends StatefulWidget { | |
final Widget child; | |
final Widget? bottomContent; | |
const WithBottomScrollableContent({ | |
Key? key, | |
required this.child, | |
this.bottomContent, | |
}) : super(key: key); |
import 'package:flutter_meedu/meedu.dart'; | |
class LoginController extends StateNotifier<LoginState> { | |
// you need pass an inital state using super | |
LoginController():super(LoginState.initialState); | |
void onEmailChanged(String email) { | |
state = state.copyWith(email: email); | |
} |
import 'dart:async'; | |
import 'package:geolocator/geolocator.dart'; | |
class GeolocatorWrapper { | |
StreamController<Position>? _positionController; | |
StreamController<bool>? _serviceEnabledController; | |
StreamSubscription? _positionSubscription, _serviceEnabledSubscription; | |
/// check if the Location Service is Enabled | |
Future<bool> get isLocationServiceEnabled => Geolocator.isLocationServiceEnabled(); |
Crear usuario
adduser username
Agregar permission de administrador
usermod -aG sudo username