File tree 2 files changed +9
-12
lines changed
2 files changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -282,7 +282,7 @@ class HomePageState extends State<HomePage> {
282
282
// You can also upload the picked image to any server (eg : AWS s3
283
283
// or Firebase) and then return the uploaded image URL.
284
284
Future <String > _onImagePickCallback (File file) async {
285
- //return "https://d3vhc53cl8e8km.cloudfront.net/artists/220/e16cb080-cb30-11ec-b991-0ee6b8365494. jpg";
285
+ //return "https://pbs.twimg.com/media/EzmJ_YBVgAEnoF2?format= jpg&name=large ";
286
286
if (! kIsWeb) {
287
287
// Copies the picked file from temporary cache to applications directory
288
288
final appDocDir = await getApplicationDocumentsDirectory ();
@@ -315,6 +315,10 @@ class HomePageState extends State<HomePage> {
315
315
}
316
316
317
317
final file = File .fromRawPath (bytes);
318
+
319
+ // TODO maybe I don't need to call `onImagePickCallback` here.
320
+ // Recheck the flow on mobile devices and then on the web, do not call `onImagePickCallback` here.
321
+ // Let's try to use base64 or something
318
322
319
323
return onImagePickCallback (file);
320
324
}
Original file line number Diff line number Diff line change @@ -11,20 +11,13 @@ import 'package:flutter_test/flutter_test.dart';
11
11
import 'package:app/main.dart' ;
12
12
13
13
void main () {
14
- testWidgets ('Counter increments smoke test ' , (WidgetTester tester) async {
14
+ testWidgets ('Normal setup ' , (WidgetTester tester) async {
15
15
// Build our app and trigger a frame.
16
16
await tester.pumpWidget (const App ());
17
17
18
- // Verify that our counter starts at 0.
19
- expect (find.text ('0' ), findsOneWidget);
20
- expect (find.text ('1' ), findsNothing);
18
+ await tester.pumpAndSettle ();
21
19
22
- // Tap the '+' icon and trigger a frame.
23
- await tester.tap (find.byIcon (Icons .add));
24
- await tester.pump ();
25
-
26
- // Verify that our counter has incremented.
27
- expect (find.text ('0' ), findsNothing);
28
- expect (find.text ('1' ), findsOneWidget);
20
+ // Expect to find the normal page setup
21
+ expect (find.text ('Flutter Quill' ), findsOneWidget);
29
22
});
30
23
}
You can’t perform that action at this time.
0 commit comments