✨ Add post toolbar
This commit is contained in:
		@@ -29,10 +29,10 @@
 | 
			
		||||
	<key>UIApplicationSupportsIndirectInputEvents</key>
 | 
			
		||||
	<true/>
 | 
			
		||||
	<key>LSApplicationQueriesSchemes</key>
 | 
			
		||||
    <array>
 | 
			
		||||
      <string>sms</string>
 | 
			
		||||
      <string>tel</string>
 | 
			
		||||
    </array>
 | 
			
		||||
	<array>
 | 
			
		||||
		<string>sms</string>
 | 
			
		||||
		<string>tel</string>
 | 
			
		||||
	</array>
 | 
			
		||||
	<key>UIBackgroundModes</key>
 | 
			
		||||
	<array>
 | 
			
		||||
		<string>fetch</string>
 | 
			
		||||
@@ -55,5 +55,11 @@
 | 
			
		||||
		<string>UIInterfaceOrientationLandscapeLeft</string>
 | 
			
		||||
		<string>UIInterfaceOrientationLandscapeRight</string>
 | 
			
		||||
	</array>
 | 
			
		||||
	<key>NSCameraUsageDescription</key>
 | 
			
		||||
	<string>Allow Solar access to your camera to take photo, so that you can attach image in your post.</string>
 | 
			
		||||
	<key>NSMicrophoneUsageDescription</key>
 | 
			
		||||
	<string>Allow Solar access to your microphone to record audio, so that you can attach image in your post.</string>
 | 
			
		||||
	<key>NSPhotoLibraryUsageDescription</key>
 | 
			
		||||
	<string>Allow Solar access to your photo library, so that you can attach image in your post.</string>
 | 
			
		||||
</dict>
 | 
			
		||||
</plist>
 | 
			
		||||
 
 | 
			
		||||
@@ -2,6 +2,7 @@ import 'dart:convert';
 | 
			
		||||
 | 
			
		||||
import 'package:flutter/cupertino.dart';
 | 
			
		||||
import 'package:flutter/material.dart';
 | 
			
		||||
import 'package:image_picker/image_picker.dart';
 | 
			
		||||
import 'package:shared_preferences/shared_preferences.dart';
 | 
			
		||||
import 'package:solaragent/auth.dart';
 | 
			
		||||
import 'package:solaragent/router.dart';
 | 
			
		||||
@@ -15,6 +16,7 @@ class MomentEditorScreen extends StatefulWidget {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
class _MomentEditorScreenState extends State<MomentEditorScreen> {
 | 
			
		||||
  final picker = ImagePicker();
 | 
			
		||||
  final contentController = TextEditingController();
 | 
			
		||||
 | 
			
		||||
  bool isSubmitting = false;
 | 
			
		||||
@@ -100,6 +102,23 @@ class _MomentEditorScreenState extends State<MomentEditorScreen> {
 | 
			
		||||
              ),
 | 
			
		||||
            ),
 | 
			
		||||
          ),
 | 
			
		||||
          // Toolbar
 | 
			
		||||
          Container(
 | 
			
		||||
            decoration: const BoxDecoration(
 | 
			
		||||
              border: Border(
 | 
			
		||||
                top: BorderSide(width: 0.3, color: Color(0xffdedede)),
 | 
			
		||||
              ),
 | 
			
		||||
            ),
 | 
			
		||||
            child: Row(
 | 
			
		||||
              children: [
 | 
			
		||||
                TextButton(
 | 
			
		||||
                  onPressed: null,
 | 
			
		||||
                  style: TextButton.styleFrom(shape: const CircleBorder()),
 | 
			
		||||
                  child: const Icon(Icons.camera_alt),
 | 
			
		||||
                )
 | 
			
		||||
              ],
 | 
			
		||||
            ),
 | 
			
		||||
          ),
 | 
			
		||||
          // Recommend website banner
 | 
			
		||||
          showRecommendationBanner
 | 
			
		||||
              ? FutureBuilder(
 | 
			
		||||
 
 | 
			
		||||
@@ -6,10 +6,14 @@
 | 
			
		||||
 | 
			
		||||
#include "generated_plugin_registrant.h"
 | 
			
		||||
 | 
			
		||||
#include <file_selector_linux/file_selector_plugin.h>
 | 
			
		||||
#include <flutter_secure_storage_linux/flutter_secure_storage_linux_plugin.h>
 | 
			
		||||
#include <url_launcher_linux/url_launcher_plugin.h>
 | 
			
		||||
 | 
			
		||||
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);
 | 
			
		||||
  g_autoptr(FlPluginRegistrar) flutter_secure_storage_linux_registrar =
 | 
			
		||||
      fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterSecureStorageLinuxPlugin");
 | 
			
		||||
  flutter_secure_storage_linux_plugin_register_with_registrar(flutter_secure_storage_linux_registrar);
 | 
			
		||||
 
 | 
			
		||||
@@ -3,6 +3,7 @@
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
list(APPEND FLUTTER_PLUGIN_LIST
 | 
			
		||||
  file_selector_linux
 | 
			
		||||
  flutter_secure_storage_linux
 | 
			
		||||
  url_launcher_linux
 | 
			
		||||
)
 | 
			
		||||
 
 | 
			
		||||
@@ -5,6 +5,7 @@
 | 
			
		||||
import FlutterMacOS
 | 
			
		||||
import Foundation
 | 
			
		||||
 | 
			
		||||
import file_selector_macos
 | 
			
		||||
import flutter_secure_storage_macos
 | 
			
		||||
import package_info_plus
 | 
			
		||||
import path_provider_foundation
 | 
			
		||||
@@ -12,6 +13,7 @@ import shared_preferences_foundation
 | 
			
		||||
import url_launcher_macos
 | 
			
		||||
 | 
			
		||||
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
 | 
			
		||||
  FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin"))
 | 
			
		||||
  FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin"))
 | 
			
		||||
  FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
 | 
			
		||||
  PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										120
									
								
								pubspec.lock
									
									
									
									
									
								
							
							
						
						
									
										120
									
								
								pubspec.lock
									
									
									
									
									
								
							@@ -81,6 +81,14 @@ packages:
 | 
			
		||||
      url: "https://pub.dev"
 | 
			
		||||
    source: hosted
 | 
			
		||||
    version: "3.1.1"
 | 
			
		||||
  cross_file:
 | 
			
		||||
    dependency: transitive
 | 
			
		||||
    description:
 | 
			
		||||
      name: cross_file
 | 
			
		||||
      sha256: fedaadfa3a6996f75211d835aaeb8fede285dae94262485698afd832371b9a5e
 | 
			
		||||
      url: "https://pub.dev"
 | 
			
		||||
    source: hosted
 | 
			
		||||
    version: "0.3.3+8"
 | 
			
		||||
  crypto:
 | 
			
		||||
    dependency: transitive
 | 
			
		||||
    description:
 | 
			
		||||
@@ -121,6 +129,38 @@ packages:
 | 
			
		||||
      url: "https://pub.dev"
 | 
			
		||||
    source: hosted
 | 
			
		||||
    version: "7.0.0"
 | 
			
		||||
  file_selector_linux:
 | 
			
		||||
    dependency: transitive
 | 
			
		||||
    description:
 | 
			
		||||
      name: file_selector_linux
 | 
			
		||||
      sha256: "045d372bf19b02aeb69cacf8b4009555fb5f6f0b7ad8016e5f46dd1387ddd492"
 | 
			
		||||
      url: "https://pub.dev"
 | 
			
		||||
    source: hosted
 | 
			
		||||
    version: "0.9.2+1"
 | 
			
		||||
  file_selector_macos:
 | 
			
		||||
    dependency: transitive
 | 
			
		||||
    description:
 | 
			
		||||
      name: file_selector_macos
 | 
			
		||||
      sha256: b15c3da8bd4908b9918111fa486903f5808e388b8d1c559949f584725a6594d6
 | 
			
		||||
      url: "https://pub.dev"
 | 
			
		||||
    source: hosted
 | 
			
		||||
    version: "0.9.3+3"
 | 
			
		||||
  file_selector_platform_interface:
 | 
			
		||||
    dependency: transitive
 | 
			
		||||
    description:
 | 
			
		||||
      name: file_selector_platform_interface
 | 
			
		||||
      sha256: a3994c26f10378a039faa11de174d7b78eb8f79e4dd0af2a451410c1a5c3f66b
 | 
			
		||||
      url: "https://pub.dev"
 | 
			
		||||
    source: hosted
 | 
			
		||||
    version: "2.6.2"
 | 
			
		||||
  file_selector_windows:
 | 
			
		||||
    dependency: transitive
 | 
			
		||||
    description:
 | 
			
		||||
      name: file_selector_windows
 | 
			
		||||
      sha256: d3547240c20cabf205c7c7f01a50ecdbc413755814d6677f3cb366f04abcead0
 | 
			
		||||
      url: "https://pub.dev"
 | 
			
		||||
    source: hosted
 | 
			
		||||
    version: "0.9.3+1"
 | 
			
		||||
  flutter:
 | 
			
		||||
    dependency: "direct main"
 | 
			
		||||
    description: flutter
 | 
			
		||||
@@ -158,6 +198,14 @@ packages:
 | 
			
		||||
      url: "https://pub.dev"
 | 
			
		||||
    source: hosted
 | 
			
		||||
    version: "0.6.22"
 | 
			
		||||
  flutter_plugin_android_lifecycle:
 | 
			
		||||
    dependency: transitive
 | 
			
		||||
    description:
 | 
			
		||||
      name: flutter_plugin_android_lifecycle
 | 
			
		||||
      sha256: b068ffc46f82a55844acfa4fdbb61fad72fa2aef0905548419d97f0f95c456da
 | 
			
		||||
      url: "https://pub.dev"
 | 
			
		||||
    source: hosted
 | 
			
		||||
    version: "2.0.17"
 | 
			
		||||
  flutter_secure_storage:
 | 
			
		||||
    dependency: "direct main"
 | 
			
		||||
    description:
 | 
			
		||||
@@ -256,6 +304,70 @@ packages:
 | 
			
		||||
      url: "https://pub.dev"
 | 
			
		||||
    source: hosted
 | 
			
		||||
    version: "4.1.7"
 | 
			
		||||
  image_picker:
 | 
			
		||||
    dependency: "direct main"
 | 
			
		||||
    description:
 | 
			
		||||
      name: image_picker
 | 
			
		||||
      sha256: "26222b01a0c9a2c8fe02fc90b8208bd3325da5ed1f4a2acabf75939031ac0bdd"
 | 
			
		||||
      url: "https://pub.dev"
 | 
			
		||||
    source: hosted
 | 
			
		||||
    version: "1.0.7"
 | 
			
		||||
  image_picker_android:
 | 
			
		||||
    dependency: transitive
 | 
			
		||||
    description:
 | 
			
		||||
      name: image_picker_android
 | 
			
		||||
      sha256: "39f2bfe497e495450c81abcd44b62f56c2a36a37a175da7d137b4454977b51b1"
 | 
			
		||||
      url: "https://pub.dev"
 | 
			
		||||
    source: hosted
 | 
			
		||||
    version: "0.8.9+3"
 | 
			
		||||
  image_picker_for_web:
 | 
			
		||||
    dependency: transitive
 | 
			
		||||
    description:
 | 
			
		||||
      name: image_picker_for_web
 | 
			
		||||
      sha256: e2423c53a68b579a7c37a1eda967b8ae536c3d98518e5db95ca1fe5719a730a3
 | 
			
		||||
      url: "https://pub.dev"
 | 
			
		||||
    source: hosted
 | 
			
		||||
    version: "3.0.2"
 | 
			
		||||
  image_picker_ios:
 | 
			
		||||
    dependency: transitive
 | 
			
		||||
    description:
 | 
			
		||||
      name: image_picker_ios
 | 
			
		||||
      sha256: "917a5cadd67d052554cfb258595e54217de53fac5b52939426e26319a02e6297"
 | 
			
		||||
      url: "https://pub.dev"
 | 
			
		||||
    source: hosted
 | 
			
		||||
    version: "0.8.9+2"
 | 
			
		||||
  image_picker_linux:
 | 
			
		||||
    dependency: transitive
 | 
			
		||||
    description:
 | 
			
		||||
      name: image_picker_linux
 | 
			
		||||
      sha256: "4ed1d9bb36f7cd60aa6e6cd479779cc56a4cb4e4de8f49d487b1aaad831300fa"
 | 
			
		||||
      url: "https://pub.dev"
 | 
			
		||||
    source: hosted
 | 
			
		||||
    version: "0.2.1+1"
 | 
			
		||||
  image_picker_macos:
 | 
			
		||||
    dependency: transitive
 | 
			
		||||
    description:
 | 
			
		||||
      name: image_picker_macos
 | 
			
		||||
      sha256: "3f5ad1e8112a9a6111c46d0b57a7be2286a9a07fc6e1976fdf5be2bd31d4ff62"
 | 
			
		||||
      url: "https://pub.dev"
 | 
			
		||||
    source: hosted
 | 
			
		||||
    version: "0.2.1+1"
 | 
			
		||||
  image_picker_platform_interface:
 | 
			
		||||
    dependency: transitive
 | 
			
		||||
    description:
 | 
			
		||||
      name: image_picker_platform_interface
 | 
			
		||||
      sha256: "3d2c323daea9d60608f1caf30be32a938916f4975434b8352e6f73dae496da38"
 | 
			
		||||
      url: "https://pub.dev"
 | 
			
		||||
    source: hosted
 | 
			
		||||
    version: "2.9.4"
 | 
			
		||||
  image_picker_windows:
 | 
			
		||||
    dependency: transitive
 | 
			
		||||
    description:
 | 
			
		||||
      name: image_picker_windows
 | 
			
		||||
      sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb"
 | 
			
		||||
      url: "https://pub.dev"
 | 
			
		||||
    source: hosted
 | 
			
		||||
    version: "0.2.1+1"
 | 
			
		||||
  infinite_scroll_pagination:
 | 
			
		||||
    dependency: "direct main"
 | 
			
		||||
    description:
 | 
			
		||||
@@ -352,6 +464,14 @@ packages:
 | 
			
		||||
      url: "https://pub.dev"
 | 
			
		||||
    source: hosted
 | 
			
		||||
    version: "1.12.0"
 | 
			
		||||
  mime:
 | 
			
		||||
    dependency: transitive
 | 
			
		||||
    description:
 | 
			
		||||
      name: mime
 | 
			
		||||
      sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2"
 | 
			
		||||
      url: "https://pub.dev"
 | 
			
		||||
    source: hosted
 | 
			
		||||
    version: "1.0.5"
 | 
			
		||||
  oauth2:
 | 
			
		||||
    dependency: "direct main"
 | 
			
		||||
    description:
 | 
			
		||||
 
 | 
			
		||||
@@ -46,6 +46,7 @@ dependencies:
 | 
			
		||||
  flutter_markdown: ^0.6.22
 | 
			
		||||
  infinite_scroll_pagination: ^4.0.0
 | 
			
		||||
  flutter_carousel_widget: ^2.2.0
 | 
			
		||||
  image_picker: ^1.0.7
 | 
			
		||||
 | 
			
		||||
dev_dependencies:
 | 
			
		||||
  flutter_test:
 | 
			
		||||
 
 | 
			
		||||
@@ -6,10 +6,13 @@
 | 
			
		||||
 | 
			
		||||
#include "generated_plugin_registrant.h"
 | 
			
		||||
 | 
			
		||||
#include <file_selector_windows/file_selector_windows.h>
 | 
			
		||||
#include <flutter_secure_storage_windows/flutter_secure_storage_windows_plugin.h>
 | 
			
		||||
#include <url_launcher_windows/url_launcher_windows.h>
 | 
			
		||||
 | 
			
		||||
void RegisterPlugins(flutter::PluginRegistry* registry) {
 | 
			
		||||
  FileSelectorWindowsRegisterWithRegistrar(
 | 
			
		||||
      registry->GetRegistrarForPlugin("FileSelectorWindows"));
 | 
			
		||||
  FlutterSecureStorageWindowsPluginRegisterWithRegistrar(
 | 
			
		||||
      registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin"));
 | 
			
		||||
  UrlLauncherWindowsRegisterWithRegistrar(
 | 
			
		||||
 
 | 
			
		||||
@@ -3,6 +3,7 @@
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
list(APPEND FLUTTER_PLUGIN_LIST
 | 
			
		||||
  file_selector_windows
 | 
			
		||||
  flutter_secure_storage_windows
 | 
			
		||||
  url_launcher_windows
 | 
			
		||||
)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user