intermediate
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
extension DateTimeFormat on DateTime {
|
||||
String _twoDigits(int n) => n.toString().padLeft(2, '0');
|
||||
|
||||
String formatWithMinutePrecision() {
|
||||
final year = this.year.toString();
|
||||
final month = _twoDigits(this.month);
|
||||
final day = _twoDigits(this.day);
|
||||
final hour = _twoDigits(this.hour);
|
||||
final minute = _twoDigits(this.minute);
|
||||
|
||||
return '$year-$month-$day $hour:$minute';
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
import 'package:exceptions/exceptions.dart';
|
||||
import 'package:riverpod/riverpod.dart';
|
||||
|
||||
extension AsyncExtension<T> on Result<T> {
|
||||
AsyncValue<T> toAsyncValue() {
|
||||
return switch (this) {
|
||||
Success(value: final value) => AsyncValue.data(value),
|
||||
// TODO: Handle this case.
|
||||
Failure(
|
||||
error: final error,
|
||||
) =>
|
||||
AsyncError(error.message, error.stackTrace ?? StackTrace.empty),
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@ import 'package:lensai/features/chat_archive/presentation/screens/list.dart';
|
||||
import 'package:lensai/features/chat_archive/presentation/screens/search.dart';
|
||||
import 'package:lensai/features/search_browser/presentation/screens/browser.dart';
|
||||
import 'package:lensai/features/settings/presentation/screens/settings.dart';
|
||||
import 'package:lensai/features/topics/presentation/screens/topic_list.dart';
|
||||
import 'package:lensai/features/geckoview/features/topics/presentation/screens/topic_list.dart';
|
||||
|
||||
part 'routes.g.dart';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user