mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
Refactor mobile to use OpenApi generated SDK (#336)
This commit is contained in:
@@ -5,9 +5,11 @@ import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:immich_mobile/modules/search/providers/search_page_state.provider.dart';
|
||||
|
||||
class SearchBar extends HookConsumerWidget with PreferredSizeWidget {
|
||||
SearchBar(
|
||||
{Key? key, required this.searchFocusNode, required this.onSubmitted})
|
||||
: super(key: key);
|
||||
SearchBar({
|
||||
Key? key,
|
||||
required this.searchFocusNode,
|
||||
required this.onSubmitted,
|
||||
}) : super(key: key);
|
||||
|
||||
final FocusNode searchFocusNode;
|
||||
final Function(String) onSubmitted;
|
||||
@@ -26,7 +28,8 @@ class SearchBar extends HookConsumerWidget with PreferredSizeWidget {
|
||||
ref.watch(searchPageStateProvider.notifier).disableSearch();
|
||||
searchTermController.clear();
|
||||
},
|
||||
icon: const Icon(Icons.arrow_back_ios_rounded))
|
||||
icon: const Icon(Icons.arrow_back_ios_rounded),
|
||||
)
|
||||
: const Icon(Icons.search_rounded),
|
||||
title: TextField(
|
||||
controller: searchTermController,
|
||||
@@ -50,10 +53,10 @@ class SearchBar extends HookConsumerWidget with PreferredSizeWidget {
|
||||
},
|
||||
decoration: InputDecoration(
|
||||
hintText: 'search_bar_hint'.tr(),
|
||||
enabledBorder: UnderlineInputBorder(
|
||||
enabledBorder: const UnderlineInputBorder(
|
||||
borderSide: BorderSide(color: Colors.transparent),
|
||||
),
|
||||
focusedBorder: UnderlineInputBorder(
|
||||
focusedBorder: const UnderlineInputBorder(
|
||||
borderSide: BorderSide(color: Colors.transparent),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -2,15 +2,14 @@ import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hive_flutter/hive_flutter.dart';
|
||||
import 'package:immich_mobile/constants/hive_box.dart';
|
||||
import 'package:immich_mobile/utils/capitalize_first_letter.dart';
|
||||
|
||||
class ThumbnailWithInfo extends StatelessWidget {
|
||||
const ThumbnailWithInfo(
|
||||
{Key? key,
|
||||
required this.textInfo,
|
||||
required this.imageUrl,
|
||||
required this.onTap})
|
||||
: super(key: key);
|
||||
const ThumbnailWithInfo({
|
||||
Key? key,
|
||||
required this.textInfo,
|
||||
required this.imageUrl,
|
||||
required this.onTap,
|
||||
}) : super(key: key);
|
||||
|
||||
final String textInfo;
|
||||
final String imageUrl;
|
||||
|
||||
Reference in New Issue
Block a user