mirror of
https://github.com/immich-app/immich.git
synced 2024-11-15 18:08:48 -07:00
673e97e71d
* chore(mobile): upgrade flutter sdk * gha * update kotlin * refactor * ios build * remove patch files * not touching openapi pubpsec file
31 lines
814 B
Dart
31 lines
814 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|
|
|
extension PumpConsumerWidget on WidgetTester {
|
|
/// Wraps the provided [widget] with Material app such that it becomes:
|
|
///
|
|
/// ProviderScope
|
|
/// |-MaterialApp
|
|
/// |-Material
|
|
/// |-[widget]
|
|
Future<void> pumpConsumerWidget(
|
|
Widget widget, {
|
|
Duration? duration,
|
|
EnginePhase phase = EnginePhase.sendSemanticsUpdate,
|
|
List<Override> overrides = const [],
|
|
}) async {
|
|
return pumpWidget(
|
|
ProviderScope(
|
|
overrides: overrides,
|
|
child: MaterialApp(
|
|
debugShowCheckedModeBanner: false,
|
|
home: Material(child: widget),
|
|
),
|
|
),
|
|
duration: duration,
|
|
phase: phase,
|
|
);
|
|
}
|
|
}
|