Commit a51d34d9 by Rafa Castillo Passols

Añadido cambios de los records

parents de48da35 aaf9d98d
......@@ -44,3 +44,6 @@ app.*.map.json
/android/app/profile
/android/app/release
/android/app/.cxx
# Manual
./pubspec.lock
......@@ -4,4 +4,23 @@ class PeponatorRecord {
final DateTime fecha;
PeponatorRecord({required this.jugador, required this.puntuacion, required this.fecha});
factory PeponatorRecord.desdeJson(Map<String, dynamic> json) {
return PeponatorRecord(
jugador: json['jugador'],
puntuacion: json['puntuacion'],
fecha: DateTime.parse(json['fecha'])
);
}
String aJson(){
var json = '''
{
"jugador": "$jugador",
"puntuacion": $puntuacion,
"fecha": "$fecha"
}
''';
return json;
}
}
\ No newline at end of file
......@@ -5,8 +5,10 @@
import FlutterMacOS
import Foundation
import path_provider_foundation
import shared_preferences_foundation
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
}
......@@ -35,6 +35,7 @@ dependencies:
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.8
shared_preferences: ^2.5.3
path_provider: ^2.1.5
dev_dependencies:
flutter_test:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment