diff --git a/.flutter-plugins b/.flutter-plugins new file mode 100644 index 0000000..0221b6f --- /dev/null +++ b/.flutter-plugins @@ -0,0 +1,12 @@ +# This is a generated file; do not edit or check into version control. +file_selector_linux=C:\\Users\\Shimon\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\file_selector_linux-0.9.2\\ +file_selector_macos=C:\\Users\\Shimon\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\file_selector_macos-0.9.3+1\\ +file_selector_windows=C:\\Users\\Shimon\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\file_selector_windows-0.9.3\\ +flutter_plugin_android_lifecycle=C:\\Users\\Shimon\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\flutter_plugin_android_lifecycle-2.0.15\\ +image_picker=C:\\Users\\Shimon\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\image_picker-1.0.1\\ +image_picker_android=C:\\Users\\Shimon\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\image_picker_android-0.8.7+4\\ +image_picker_for_web=C:\\Users\\Shimon\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\image_picker_for_web-2.2.0\\ +image_picker_ios=C:\\Users\\Shimon\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\image_picker_ios-0.8.8\\ +image_picker_linux=C:\\Users\\Shimon\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\image_picker_linux-0.2.1\\ +image_picker_macos=C:\\Users\\Shimon\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\image_picker_macos-0.2.1\\ +image_picker_windows=C:\\Users\\Shimon\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\image_picker_windows-0.2.1\\ diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies new file mode 100644 index 0000000..eb96929 --- /dev/null +++ b/.flutter-plugins-dependencies @@ -0,0 +1 @@ +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"image_picker_ios","path":"C:\\\\Users\\\\Shimon\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\image_picker_ios-0.8.8\\\\","native_build":true,"dependencies":[]}],"android":[{"name":"flutter_plugin_android_lifecycle","path":"C:\\\\Users\\\\Shimon\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_plugin_android_lifecycle-2.0.15\\\\","native_build":true,"dependencies":[]},{"name":"image_picker_android","path":"C:\\\\Users\\\\Shimon\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\image_picker_android-0.8.7+4\\\\","native_build":true,"dependencies":["flutter_plugin_android_lifecycle"]}],"macos":[{"name":"file_selector_macos","path":"C:\\\\Users\\\\Shimon\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\file_selector_macos-0.9.3+1\\\\","native_build":true,"dependencies":[]},{"name":"image_picker_macos","path":"C:\\\\Users\\\\Shimon\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\image_picker_macos-0.2.1\\\\","native_build":false,"dependencies":["file_selector_macos"]}],"linux":[{"name":"file_selector_linux","path":"C:\\\\Users\\\\Shimon\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\file_selector_linux-0.9.2\\\\","native_build":true,"dependencies":[]},{"name":"image_picker_linux","path":"C:\\\\Users\\\\Shimon\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\image_picker_linux-0.2.1\\\\","native_build":false,"dependencies":["file_selector_linux"]}],"windows":[{"name":"file_selector_windows","path":"C:\\\\Users\\\\Shimon\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\file_selector_windows-0.9.3\\\\","native_build":true,"dependencies":[]},{"name":"image_picker_windows","path":"C:\\\\Users\\\\Shimon\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\image_picker_windows-0.2.1\\\\","native_build":false,"dependencies":["file_selector_windows"]}],"web":[{"name":"image_picker_for_web","path":"C:\\\\Users\\\\Shimon\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\image_picker_for_web-2.2.0\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"file_selector_linux","dependencies":[]},{"name":"file_selector_macos","dependencies":[]},{"name":"file_selector_windows","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"image_picker","dependencies":["image_picker_android","image_picker_for_web","image_picker_ios","image_picker_linux","image_picker_macos","image_picker_windows"]},{"name":"image_picker_android","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"image_picker_for_web","dependencies":[]},{"name":"image_picker_ios","dependencies":[]},{"name":"image_picker_linux","dependencies":["file_selector_linux"]},{"name":"image_picker_macos","dependencies":["file_selector_macos"]},{"name":"image_picker_windows","dependencies":["file_selector_windows"]}],"date_created":"2023-07-30 19:58:13.855595","version":"3.10.4"} \ No newline at end of file diff --git a/example/fonts/Medal.ttf b/example/fonts/Medal.ttf new file mode 100644 index 0000000..dca15d8 Binary files /dev/null and b/example/fonts/Medal.ttf differ diff --git a/example/icons/close.png b/example/icons/close.png new file mode 100644 index 0000000..456e144 Binary files /dev/null and b/example/icons/close.png differ diff --git a/example/icons/share_medal.png b/example/icons/share_medal.png new file mode 100644 index 0000000..8a101d5 Binary files /dev/null and b/example/icons/share_medal.png differ diff --git a/example/images/full_hack.png b/example/images/full_hack.png new file mode 100644 index 0000000..39963ef Binary files /dev/null and b/example/images/full_hack.png differ diff --git a/example/images/social_media_hack.png b/example/images/social_media_hack.png new file mode 100644 index 0000000..ec30046 Binary files /dev/null and b/example/images/social_media_hack.png differ diff --git a/example/lib/choose_share_screen.dart b/example/lib/choose_share_screen.dart new file mode 100644 index 0000000..1a5fc23 --- /dev/null +++ b/example/lib/choose_share_screen.dart @@ -0,0 +1,82 @@ +import 'dart:io'; + +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; +import 'package:image_picker/image_picker.dart'; +import 'package:story_editor_example/share_image_secreen.dart'; + +import 'medal_icons.dart'; +import 'share_button.dart'; +import 'share_incident_screen.dart'; +import 'yedidim_thanks.dart'; + +class ChooseShareScreen extends StatelessWidget { + const ChooseShareScreen({super.key}); + + static const String shareIncidentText = 'שיתוף ארוע'; + static const String shareImageText = 'שיתוף תמונה'; + + static VoidCallback navigate(BuildContext context, Widget nextScreen) { + return () => Navigator.push( + context, + MaterialPageRoute( + builder: (context) => ShareIncidentScreen(nextScreen)), + ); + } + + // void + + @override + Widget build(BuildContext context) { + return Scaffold( + body: Container( + padding: const EdgeInsets.symmetric(vertical: 32), + alignment: Alignment.center, + child: Column( + children: [ + const Row( + children: [ + SizedBox( + child: CloseButton(), + ) + ], + ), + const YedidimThanks(), + const SizedBox(height: 40), + ShareButton( + Colors.white, + const Color.fromARGB(255, 51, 108, 160), + shareIncidentText, + Medal.medal, + onPressed: navigate(context, const YedidimThanks()), + ), + const SizedBox(height: 16), + ShareButton( + const Color.fromARGB(255, 88, 182, 108), + Colors.white, + shareImageText, + Icons.camera_alt_outlined, + onPressed: () async { + var imageFile = await takePicture(); + if (imageFile == null || !context.mounted) return; + navigate(context, ImageShow(imageFile))(); + }, + ), + ], + ), + ), + ); + } +} + +Future takePicture() async { + try { + final image = await ImagePicker().pickImage(source: ImageSource.camera); + if (image == null) return null; + return File(image.path); + } on Exception catch (e) { + // should catch only PlatformException + if (kDebugMode) print('Failed to pick image: $e'); + return null; + } +} diff --git a/example/lib/main.dart b/example/lib/main.dart index dda5554..e4fb18d 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'choose_share_screen.dart'; void main() { runApp(const MyApp()); @@ -10,116 +11,9 @@ class MyApp extends StatelessWidget { // This widget is the root of your application. @override Widget build(BuildContext context) { - return MaterialApp( - title: 'Flutter Demo', - theme: ThemeData( - // This is the theme of your application. - // - // TRY THIS: Try running your application with "flutter run". You'll see - // the application has a blue toolbar. Then, without quitting the app, - // try changing the seedColor in the colorScheme below to Colors.green - // and then invoke "hot reload" (save your changes or press the "hot - // reload" button in a Flutter-supported IDE, or press "r" if you used - // the command line to start the app). - // - // Notice that the counter didn't reset back to zero; the application - // state is not lost during the reload. To reset the state, use hot - // restart instead. - // - // This works for code too, not just values: Most code changes can be - // tested with just a hot reload. - colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), - useMaterial3: true, - ), - home: const MyHomePage(title: 'Flutter Demo Home Page'), - ); - } -} - -class MyHomePage extends StatefulWidget { - const MyHomePage({super.key, required this.title}); - - // This widget is the home page of your application. It is stateful, meaning - // that it has a State object (defined below) that contains fields that affect - // how it looks. - - // This class is the configuration for the state. It holds the values (in this - // case the title) provided by the parent (in this case the App widget) and - // used by the build method of the State. Fields in a Widget subclass are - // always marked "final". - - final String title; - - @override - State createState() => _MyHomePageState(); -} - -class _MyHomePageState extends State { - int _counter = 0; - - void _incrementCounter() { - setState(() { - // This call to setState tells the Flutter framework that something has - // changed in this State, which causes it to rerun the build method below - // so that the display can reflect the updated values. If we changed - // _counter without calling setState(), then the build method would not be - // called again, and so nothing would appear to happen. - _counter++; - }); - } - - @override - Widget build(BuildContext context) { - // This method is rerun every time setState is called, for instance as done - // by the _incrementCounter method above. - // - // The Flutter framework has been optimized to make rerunning build methods - // fast, so that you can just rebuild anything that needs updating rather - // than having to individually change instances of widgets. - return Scaffold( - appBar: AppBar( - // TRY THIS: Try changing the color here to a specific color (to - // Colors.amber, perhaps?) and trigger a hot reload to see the AppBar - // change color while the other colors stay the same. - backgroundColor: Theme.of(context).colorScheme.inversePrimary, - // Here we take the value from the MyHomePage object that was created by - // the App.build method, and use it to set our appbar title. - title: Text(widget.title), - ), - body: Center( - // Center is a layout widget. It takes a single child and positions it - // in the middle of the parent. - child: Column( - // Column is also a layout widget. It takes a list of children and - // arranges them vertically. By default, it sizes itself to fit its - // children horizontally, and tries to be as tall as its parent. - // - // Column has various properties to control how it sizes itself and - // how it positions its children. Here we use mainAxisAlignment to - // center the children vertically; the main axis here is the vertical - // axis because Columns are vertical (the cross axis would be - // horizontal). - // - // TRY THIS: Invoke "debug painting" (choose the "Toggle Debug Paint" - // action in the IDE, or press "p" in the console), to see the - // wireframe for each widget. - mainAxisAlignment: MainAxisAlignment.center, - children: [ - const Text( - 'You have pushed the button this many times:', - ), - Text( - '$_counter', - style: Theme.of(context).textTheme.headlineMedium, - ), - ], - ), - ), - floatingActionButton: FloatingActionButton( - onPressed: _incrementCounter, - tooltip: 'Increment', - child: const Icon(Icons.add), - ), // This trailing comma makes auto-formatting nicer for build methods. + return const MaterialApp( + title: 'Story Editor', + home: ChooseShareScreen(), ); } } diff --git a/example/lib/medal_icons.dart b/example/lib/medal_icons.dart new file mode 100644 index 0000000..9b787ea --- /dev/null +++ b/example/lib/medal_icons.dart @@ -0,0 +1,26 @@ +/// Flutter icons Medal +/// Copyright (C) 2023 by original authors @ fluttericon.com, fontello.com +/// This font was generated by FlutterIcon.com, which is derived from Fontello. +/// +/// To use this font, place it in your fonts/ directory and include the +/// following in your pubspec.yaml +/// +/// flutter: +/// fonts: +/// - family: Medal +/// fonts: +/// - asset: fonts/Medal.ttf +/// +/// +/// +import 'package:flutter/widgets.dart'; + +class Medal { + Medal._(); + + static const _kFontFam = 'Medal'; + static const String? _kFontPkg = null; + + static const IconData medal = + IconData(0xe800, fontFamily: _kFontFam, fontPackage: _kFontPkg); +} diff --git a/example/lib/share_button.dart b/example/lib/share_button.dart new file mode 100644 index 0000000..aa3b713 --- /dev/null +++ b/example/lib/share_button.dart @@ -0,0 +1,52 @@ +import 'package:flutter/material.dart'; + +class ShareButton extends StatelessWidget { + const ShareButton( + this.backgroundColor, this.foregroundColor, this.text, this.icon, + {super.key, this.onPressed = doNothing}); + + final Color backgroundColor; + final Color foregroundColor; + final String text; + final IconData icon; + + final void Function() onPressed; + static void doNothing() {} + + @override + Widget build(BuildContext context) { + return OutlinedButton( + style: OutlinedButton.styleFrom( + backgroundColor: backgroundColor, + foregroundColor: foregroundColor, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(32), + ), + padding: const EdgeInsets.only( + top: 16, + left: 32, + right: 32, + bottom: 18, + ), + ), + onPressed: onPressed, + child: Row( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + text, + style: const TextStyle( + fontSize: 15, + fontFamily: 'Assistant', + fontWeight: FontWeight.w600, + ), + ), + const SizedBox(width: 8), + Icon(icon), + ], + ), + ); + } +} diff --git a/example/lib/share_image_secreen.dart b/example/lib/share_image_secreen.dart new file mode 100644 index 0000000..927295a --- /dev/null +++ b/example/lib/share_image_secreen.dart @@ -0,0 +1,43 @@ +import 'dart:io'; + +import 'package:flutter/material.dart'; + +class ImageShow extends StatelessWidget { + const ImageShow( + this.imageToShare, { + super.key, + }); + + final File imageToShare; + + @override + Widget build(BuildContext context) { + return Stack( + children: [ + Image(image: FileImage(imageToShare)), + const Positioned( + top: 10, + right: 10, + child: Text("Logo Here"), + ), + const Positioned( + bottom: 15, + left: 0, + right: 0, + child: Align( + alignment: Alignment.center, + child: Text( + "!גאה להתנדב בידידים", + style: TextStyle( + fontSize: 20, + fontFamily: 'Assistant', + fontWeight: FontWeight.w600, + color: Colors.white, + ), + ), + ), + ), + ], + ); + } +} diff --git a/example/lib/share_incident_screen.dart b/example/lib/share_incident_screen.dart new file mode 100644 index 0000000..2f02981 --- /dev/null +++ b/example/lib/share_incident_screen.dart @@ -0,0 +1,44 @@ +import 'package:flutter/material.dart'; + +import 'social_media_menu.dart'; + +class ShareIncidentScreen extends StatelessWidget { + const ShareIncidentScreen( + this.imageWidget, { + super.key, + }); + + final Widget imageWidget; + + @override + Widget build(BuildContext context) { + return Scaffold( + body: Container( + padding: const EdgeInsets.symmetric(vertical: 32), + alignment: Alignment.center, + child: Column( + children: [ + // const Row(children: [CloseButton()]), + const SizedBox(height: 40), + imageWidget, + const SizedBox(height: 32), + Text( + 'שיתוף באמצעות', + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.black.withOpacity(0.54), + fontSize: 18, + fontFamily: 'Assistant', + fontWeight: FontWeight.w300, + // height: 20, + letterSpacing: 0.50, + ), + ), + const SizedBox(height: 16), + const SocialMediaMenu(), + ], + ), + ), + ); + } +} diff --git a/example/lib/social_media_menu.dart b/example/lib/social_media_menu.dart new file mode 100644 index 0000000..0ed5d88 --- /dev/null +++ b/example/lib/social_media_menu.dart @@ -0,0 +1,15 @@ +import 'package:flutter/widgets.dart'; + +class SocialMediaMenu extends StatelessWidget { + const SocialMediaMenu({super.key}); + + @override + Widget build(BuildContext context) { + return Container( + // color: Colors.blue, + child: const Image( + image: AssetImage('images/social_media_hack.png'), + ), + ); + } +} diff --git a/example/lib/yedidim_thanks.dart b/example/lib/yedidim_thanks.dart new file mode 100644 index 0000000..5d7a610 --- /dev/null +++ b/example/lib/yedidim_thanks.dart @@ -0,0 +1,15 @@ +import 'package:flutter/widgets.dart'; + +class YedidimThanks extends StatelessWidget { + const YedidimThanks({super.key}); + + @override + Widget build(BuildContext context) { + return Container( + // color: Colors.blue, + child: const Image( + image: AssetImage('images/full_hack.png'), + ), + ); + } +} diff --git a/example/linux/flutter/generated_plugin_registrant.cc b/example/linux/flutter/generated_plugin_registrant.cc index e71a16d..64a0ece 100644 --- a/example/linux/flutter/generated_plugin_registrant.cc +++ b/example/linux/flutter/generated_plugin_registrant.cc @@ -6,6 +6,10 @@ #include "generated_plugin_registrant.h" +#include void fl_register_plugins(FlPluginRegistry* registry) { + g_autoptr(FlPluginRegistrar) file_selector_linux_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin"); + file_selector_plugin_register_with_registrar(file_selector_linux_registrar); } diff --git a/example/linux/flutter/generated_plugins.cmake b/example/linux/flutter/generated_plugins.cmake index 2e1de87..2db3c22 100644 --- a/example/linux/flutter/generated_plugins.cmake +++ b/example/linux/flutter/generated_plugins.cmake @@ -3,6 +3,7 @@ # list(APPEND FLUTTER_PLUGIN_LIST + file_selector_linux ) list(APPEND FLUTTER_FFI_PLUGIN_LIST diff --git a/example/macos/Flutter/GeneratedPluginRegistrant.swift b/example/macos/Flutter/GeneratedPluginRegistrant.swift index cccf817..14b5f7c 100644 --- a/example/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/example/macos/Flutter/GeneratedPluginRegistrant.swift @@ -5,6 +5,8 @@ import FlutterMacOS import Foundation +import file_selector_macos func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { + FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin")) } diff --git a/example/pubspec.lock b/example/pubspec.lock index bc7dff8..8f07139 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -41,6 +41,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.17.1" + cross_file: + dependency: transitive + description: + name: cross_file + sha256: "0b0036e8cccbfbe0555fd83c1d31a6f30b77a96b598b35a5d36dd41f718695e9" + url: "https://pub.dev" + source: hosted + version: "0.3.3+4" cupertino_icons: dependency: "direct main" description: @@ -57,6 +65,38 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.1" + file_selector_linux: + dependency: transitive + description: + name: file_selector_linux + sha256: "770eb1ab057b5ae4326d1c24cc57710758b9a46026349d021d6311bd27580046" + url: "https://pub.dev" + source: hosted + version: "0.9.2" + file_selector_macos: + dependency: transitive + description: + name: file_selector_macos + sha256: "4ada532862917bf16e3adb3891fe3a5917a58bae03293e497082203a80909412" + url: "https://pub.dev" + source: hosted + version: "0.9.3+1" + file_selector_platform_interface: + dependency: transitive + description: + name: file_selector_platform_interface + sha256: "412705a646a0ae90f33f37acfae6a0f7cbc02222d6cd34e479421c3e74d3853c" + url: "https://pub.dev" + source: hosted + version: "2.6.0" + file_selector_windows: + dependency: transitive + description: + name: file_selector_windows + sha256: "1372760c6b389842b77156203308940558a2817360154084368608413835fc26" + url: "https://pub.dev" + source: hosted + version: "0.9.3" flutter: dependency: "direct main" description: flutter @@ -70,11 +110,104 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.1" + flutter_plugin_android_lifecycle: + dependency: transitive + description: + name: flutter_plugin_android_lifecycle + sha256: "950e77c2bbe1692bc0874fc7fb491b96a4dc340457f4ea1641443d0a6c1ea360" + url: "https://pub.dev" + source: hosted + version: "2.0.15" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + http: + dependency: transitive + description: + name: http + sha256: "759d1a329847dd0f39226c688d3e06a6b8679668e350e2891a6474f8b4bb8525" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" + source: hosted + version: "4.0.2" + image_picker: + dependency: "direct main" + description: + name: image_picker + sha256: "6296e98782726d37f59663f0727d0e978eee1ced1ffed45ccaba591786a7f7b3" + url: "https://pub.dev" + source: hosted + version: "1.0.1" + image_picker_android: + dependency: transitive + description: + name: image_picker_android + sha256: "8179b54039b50eee561676232304f487602e2950ffb3e8995ed9034d6505ca34" + url: "https://pub.dev" + source: hosted + version: "0.8.7+4" + image_picker_for_web: + dependency: transitive + description: + name: image_picker_for_web + sha256: "869fe8a64771b7afbc99fc433a5f7be2fea4d1cb3d7c11a48b6b579eb9c797f0" + url: "https://pub.dev" + source: hosted + version: "2.2.0" + image_picker_ios: + dependency: transitive + description: + name: image_picker_ios + sha256: b3e2f21feb28b24dd73a35d7ad6e83f568337c70afab5eabac876e23803f264b + url: "https://pub.dev" + source: hosted + version: "0.8.8" + image_picker_linux: + dependency: transitive + description: + name: image_picker_linux + sha256: "02cbc21fe1706b97942b575966e5fbbeaac535e76deef70d3a242e4afb857831" + url: "https://pub.dev" + source: hosted + version: "0.2.1" + image_picker_macos: + dependency: transitive + description: + name: image_picker_macos + sha256: cee2aa86c56780c13af2c77b5f2f72973464db204569e1ba2dd744459a065af4 + url: "https://pub.dev" + source: hosted + version: "0.2.1" + image_picker_platform_interface: + dependency: transitive + description: + name: image_picker_platform_interface + sha256: c1134543ae2187e85299996d21c526b2f403854994026d575ae4cf30d7bb2a32 + url: "https://pub.dev" + source: hosted + version: "2.9.0" + image_picker_windows: + dependency: transitive + description: + name: image_picker_windows + sha256: c3066601ea42113922232c7b7b3330a2d86f029f685bba99d82c30e799914952 + url: "https://pub.dev" + source: hosted + version: "0.2.1" js: dependency: transitive description: @@ -115,6 +248,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.9.1" + mime: + dependency: transitive + description: + name: mime + sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e + url: "https://pub.dev" + source: hosted + version: "1.0.4" path: dependency: transitive description: @@ -123,6 +264,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.8.3" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "43798d895c929056255600343db8f049921cbec94d31ec87f1dc5c16c01935dd" + url: "https://pub.dev" + source: hosted + version: "2.1.5" sky_engine: dependency: transitive description: flutter @@ -183,6 +332,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.5.1" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" + source: hosted + version: "1.3.2" vector_math: dependency: transitive description: @@ -193,4 +350,4 @@ packages: version: "2.1.4" sdks: dart: ">=3.0.2 <4.0.0" - flutter: ">=1.17.0" + flutter: ">=3.3.0" diff --git a/example/pubspec.yaml b/example/pubspec.yaml index cf5bdd5..6dd7007 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -30,6 +30,7 @@ environment: dependencies: flutter: sdk: flutter + image_picker: ^1.0.1 # The following adds the Cupertino Icons font to your application. @@ -61,9 +62,11 @@ flutter: uses-material-design: true # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg + assets: + - images/full_hack.png + - images/social_media_hack.png + - icons/share_medal.png + - icons/close.png # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.dev/assets-and-images/#resolution-aware @@ -90,3 +93,7 @@ flutter: # # For details regarding fonts from package dependencies, # see https://flutter.dev/custom-fonts/#from-packages + fonts: + - family: Medal + fonts: + - asset: fonts/Medal.ttf \ No newline at end of file diff --git a/example/windows/flutter/generated_plugin_registrant.cc b/example/windows/flutter/generated_plugin_registrant.cc index 8b6d468..77ab7a0 100644 --- a/example/windows/flutter/generated_plugin_registrant.cc +++ b/example/windows/flutter/generated_plugin_registrant.cc @@ -6,6 +6,9 @@ #include "generated_plugin_registrant.h" +#include void RegisterPlugins(flutter::PluginRegistry* registry) { + FileSelectorWindowsRegisterWithRegistrar( + registry->GetRegistrarForPlugin("FileSelectorWindows")); } diff --git a/example/windows/flutter/generated_plugins.cmake b/example/windows/flutter/generated_plugins.cmake index b93c4c3..a423a02 100644 --- a/example/windows/flutter/generated_plugins.cmake +++ b/example/windows/flutter/generated_plugins.cmake @@ -3,6 +3,7 @@ # list(APPEND FLUTTER_PLUGIN_LIST + file_selector_windows ) list(APPEND FLUTTER_FFI_PLUGIN_LIST diff --git a/pubspec.yaml b/pubspec.yaml index ff7791f..cb97517 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,6 +11,7 @@ environment: dependencies: flutter: sdk: flutter + image_picker: ^1.0.1 dev_dependencies: flutter_test: