mirror of
https://github.com/wger-project/flutter.git
synced 2026-12-06 15:54:31 +01:00
Set correct type for metadata variable
This commit is contained in:
1 parent
ce0231fd2d
commit
6fa492c569
1 file changed
+2
-2
@@ -84,7 +84,7 @@ class Auth with ChangeNotifier {
|
||||
required String serverUrl,
|
||||
}) async {
|
||||
final uri = Uri.parse(serverUrl + '/api/v2/register/');
|
||||
Map<String, String> metadata = Map();
|
||||
Map<String, String>? metadata = Map();
|
||||
|
||||
// Read the api key from the manifest file
|
||||
try {
|
||||
@@ -103,7 +103,7 @@ class Auth with ChangeNotifier {
|
||||
uri,
|
||||
headers: {
|
||||
HttpHeaders.contentTypeHeader: 'application/json; charset=UTF-8',
|
||||
HttpHeaders.authorizationHeader: "Token ${metadata['wger.api_key']}"
|
||||
HttpHeaders.authorizationHeader: "Token ${metadata!['wger.api_key']}"
|
||||
},
|
||||
body: json.encode(data),
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user