1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 22:09:06 +00:00

Migrate web dashboard to null safety (#928)

* update dependencies

* Update to cloud_firestore 2.x.x

* run dart migrate

* Fix analyzer warnings from null safety migration

* Fix errors resulting from null safety migration

* Fix info level warnings

* run flutter format

* fix tests

* remove unused import, format
This commit is contained in:
John Ryan
2021-10-12 14:38:34 -07:00
committed by GitHub
parent 0061b0d70d
commit 4893a24625
20 changed files with 277 additions and 301 deletions

View File

@@ -15,9 +15,9 @@ abstract class DashboardApi {
/// Manipulates [Category] data.
abstract class CategoryApi {
Future<Category> delete(String id);
Future<Category?> delete(String id);
Future<Category> get(String id);
Future<Category?> get(String id);
Future<Category> insert(Category category);
@@ -30,9 +30,9 @@ abstract class CategoryApi {
/// Manipulates [Entry] data.
abstract class EntryApi {
Future<Entry> delete(String categoryId, String id);
Future<Entry?> delete(String categoryId, String id);
Future<Entry> get(String categoryId, String id);
Future<Entry?> get(String categoryId, String id);
Future<Entry> insert(String categoryId, Entry entry);
@@ -49,7 +49,7 @@ class Category {
String name;
@JsonKey(ignore: true)
String id;
String? id;
Category(this.name);
@@ -76,7 +76,7 @@ class Entry {
DateTime time;
@JsonKey(ignore: true)
String id;
String? id;
Entry(this.value, this.time);