mirror of
				https://github.com/KevinMidboe/immich.git
				synced 2025-10-29 17:40:28 +00:00 
			
		
		
		
	Clean code of shared folder (#249)
* optimize android side gradle settings * android minsdk back to 21 * remove unused package, update linter and fix lint error * clean code of 'shared module' with offical dart style guide * restore uploadProfileImage method in UserService
This commit is contained in:
		| @@ -3,6 +3,7 @@ import 'dart:convert'; | ||||
| import 'package:dio/dio.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:hive/hive.dart'; | ||||
| import 'package:http_parser/http_parser.dart'; | ||||
| import 'package:image_picker/image_picker.dart'; | ||||
| import 'package:immich_mobile/constants/hive_box.dart'; | ||||
| import 'package:immich_mobile/shared/models/upload_profile_image_repsonse.model.dart'; | ||||
| @@ -10,14 +11,13 @@ import 'package:immich_mobile/shared/models/user.model.dart'; | ||||
| import 'package:immich_mobile/shared/services/network.service.dart'; | ||||
| import 'package:immich_mobile/utils/dio_http_interceptor.dart'; | ||||
| import 'package:immich_mobile/utils/files_helper.dart'; | ||||
| import 'package:http_parser/http_parser.dart'; | ||||
|  | ||||
| class UserService { | ||||
|   final NetworkService _networkService = NetworkService(); | ||||
|  | ||||
|   Future<List<User>> getAllUsersInfo() async { | ||||
|     try { | ||||
|       Response res = await _networkService.getRequest(url: 'user'); | ||||
|       var res = await _networkService.getRequest(url: 'user'); | ||||
|       List<dynamic> decodedData = jsonDecode(res.toString()); | ||||
|       List<User> result = List.from(decodedData.map((e) => User.fromMap(e))); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user