mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-22 02:24:30 +00:00
clean up and test fixes
This commit is contained in:
parent
9fce8ca107
commit
56f54ac487
3 changed files with 63 additions and 58 deletions
|
@ -1,13 +1,11 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:stackwallet/providers/ui/color_theme_provider.dart';
|
||||
import 'package:stackwallet/utilities/assets.dart';
|
||||
import 'package:stackwallet/utilities/theme/color_theme.dart';
|
||||
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||
import 'package:stackwallet/widgets/conditional_parent.dart';
|
||||
|
||||
class Background extends ConsumerWidget {
|
||||
class Background extends StatelessWidget {
|
||||
const Background({
|
||||
Key? key,
|
||||
required this.child,
|
||||
|
@ -16,12 +14,10 @@ class Background extends ConsumerWidget {
|
|||
final Widget child;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final colorTheme = ref.watch(colorThemeProvider.state).state;
|
||||
|
||||
Widget build(BuildContext context) {
|
||||
Color? color;
|
||||
|
||||
switch (colorTheme.themeType) {
|
||||
switch (Theme.of(context).extension<StackColors>()!.themeType) {
|
||||
case ThemeType.light:
|
||||
case ThemeType.dark:
|
||||
color = Theme.of(context).extension<StackColors>()!.background;
|
||||
|
|
|
@ -131,7 +131,9 @@ class _EmojiSelectSheetState extends ConsumerState<EmojiSelectSheet> {
|
|||
SizedBox(
|
||||
height: isDesktop ? 16 : 12,
|
||||
),
|
||||
ClipRRect(
|
||||
Material(
|
||||
color: Colors.transparent,
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(
|
||||
Constants.size.circularBorderRadius,
|
||||
),
|
||||
|
@ -183,6 +185,7 @@ class _EmojiSelectSheetState extends ConsumerState<EmojiSelectSheet> {
|
|||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: isDesktop ? 28 : 16,
|
||||
),
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import 'package:emojis/emoji.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:mockingjay/mockingjay.dart' as mockingjay;
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:mockingjay/mockingjay.dart' as mockingjay;
|
||||
import 'package:stackwallet/utilities/theme/light_colors.dart';
|
||||
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||
import 'package:stackwallet/widgets/emoji_select_sheet.dart';
|
||||
|
@ -43,15 +43,21 @@ void main() {
|
|||
],
|
||||
),
|
||||
home: mockingjay.MockNavigatorProvider(
|
||||
navigator: navigator, child: emojiSelectSheet),
|
||||
navigator: navigator,
|
||||
child: Column(
|
||||
children: const [
|
||||
Expanded(child: emojiSelectSheet),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
final gestureDetector = find.byType(GestureDetector).first;
|
||||
final gestureDetector = find.byType(GestureDetector).at(5);
|
||||
expect(gestureDetector, findsOneWidget);
|
||||
|
||||
final emoji = Emoji.all()[0];
|
||||
final emoji = Emoji.byChar("😅");
|
||||
|
||||
await tester.tap(gestureDetector);
|
||||
await tester.pumpAndSettle();
|
||||
|
|
Loading…
Reference in a new issue