Skip to content

Lab4#4

Open
DeVoytinc wants to merge 4 commits intomainfrom
lab4
Open

Lab4#4
DeVoytinc wants to merge 4 commits intomainfrom
lab4

Conversation

@DeVoytinc
Copy link
Copy Markdown
Owner

No description provided.

Comment on lines +55 to +68
Future<String> downloadAndSaveImage(String url, String fileName) async {
final directory = await getApplicationDocumentsDirectory();
final filePath = p.join(directory.path, fileName);

Dio dio = Dio();
final response = await dio.get(
url,
options: Options(responseType: ResponseType.bytes),
);
final file = File(filePath);
await file.writeAsBytes(response.data);

return filePath;
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Нарушает SRP

}

@DriftDatabase(tables: [Characters])
class AppDatabase extends _$AppDatabase {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Написать интерфейс

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants