mirror of
https://github.com/flutter/samples.git
synced 2026-06-06 06:19:19 +00:00
Remove code_sharing and place_tracker, cleanup repo (#2831)
Fixes #2818, #2523, #2528
This commit is contained in:
@@ -4,13 +4,11 @@
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:menubar/menubar.dart' as menubar;
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:window_size/window_size.dart';
|
||||
|
||||
import 'src/model/photo_search_model.dart';
|
||||
import 'src/unsplash/unsplash.dart';
|
||||
@@ -37,8 +35,6 @@ void main() {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
setupWindow();
|
||||
|
||||
runApp(
|
||||
ChangeNotifierProvider<PhotoSearchModel>(
|
||||
create: (context) =>
|
||||
@@ -48,17 +44,6 @@ void main() {
|
||||
);
|
||||
}
|
||||
|
||||
const double windowWidth = 1024;
|
||||
const double windowHeight = 800;
|
||||
|
||||
void setupWindow() {
|
||||
if (!kIsWeb &&
|
||||
(Platform.isWindows || Platform.isLinux || Platform.isMacOS)) {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
setWindowMinSize(const Size(windowWidth, windowHeight));
|
||||
}
|
||||
}
|
||||
|
||||
class UnsplashSearchApp extends StatelessWidget {
|
||||
const UnsplashSearchApp({super.key});
|
||||
|
||||
|
||||
@@ -19,8 +19,6 @@ import 'package:flutter/material.dart';
|
||||
///
|
||||
/// The user can drag the widget with key [dividerKey] to change
|
||||
/// the space allocated between [firstChild] and [secondChild].
|
||||
// TODO(djshuckerow): introduce support for a minimum fraction a child
|
||||
// is allowed.
|
||||
class Split extends StatefulWidget {
|
||||
/// Builds a split oriented along [axis].
|
||||
const Split({
|
||||
@@ -125,12 +123,6 @@ class _SplitState extends State<Split> {
|
||||
});
|
||||
}
|
||||
|
||||
// TODO(https://github.com/flutter/flutter/issues/43747): use an icon.
|
||||
// The material icon for a drag handle is not currently available.
|
||||
// For now, draw an indicator that is 3 lines running in the direction
|
||||
// of the main axis, like a hamburger menu.
|
||||
// TODO(https://github.com/flutter/devtools/issues/1265): update mouse
|
||||
// to indicate that this is resizable.
|
||||
final dragIndicator = Flex(
|
||||
direction: isHorizontal ? Axis.vertical : Axis.horizontal,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// TODO: Retrieve an API Access Key from https://unsplash.com/developers
|
||||
// To use this sample: Retrieve an API Access Key from https://unsplash.com/developers
|
||||
const String unsplashAccessKey = '';
|
||||
|
||||
// The application name for the above API Access Key.
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
#include <file_selector_linux/file_selector_plugin.h>
|
||||
#include <menubar/menubar_plugin.h>
|
||||
#include <url_launcher_linux/url_launcher_plugin.h>
|
||||
#include <window_size/window_size_plugin.h>
|
||||
|
||||
void fl_register_plugins(FlPluginRegistry* registry) {
|
||||
g_autoptr(FlPluginRegistrar) file_selector_linux_registrar =
|
||||
@@ -21,7 +20,4 @@ void fl_register_plugins(FlPluginRegistry* registry) {
|
||||
g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
|
||||
url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);
|
||||
g_autoptr(FlPluginRegistrar) window_size_registrar =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "WindowSizePlugin");
|
||||
window_size_plugin_register_with_registrar(window_size_registrar);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@ list(APPEND FLUTTER_PLUGIN_LIST
|
||||
file_selector_linux
|
||||
menubar
|
||||
url_launcher_linux
|
||||
window_size
|
||||
)
|
||||
|
||||
list(APPEND FLUTTER_FFI_PLUGIN_LIST
|
||||
|
||||
@@ -8,11 +8,9 @@ import Foundation
|
||||
import file_selector_macos
|
||||
import menubar
|
||||
import url_launcher_macos
|
||||
import window_size
|
||||
|
||||
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||
FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin"))
|
||||
MenubarPlugin.register(with: registry.registrar(forPlugin: "MenubarPlugin"))
|
||||
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
|
||||
WindowSizePlugin.register(with: registry.registrar(forPlugin: "WindowSizePlugin"))
|
||||
}
|
||||
|
||||
@@ -25,10 +25,6 @@ dependencies:
|
||||
transparent_image: ^2.0.1
|
||||
url_launcher: ^6.1.12
|
||||
uuid: ^4.0.0
|
||||
window_size:
|
||||
git:
|
||||
url: https://github.com/google/flutter-desktop-embedding.git
|
||||
path: plugins/window_size
|
||||
|
||||
dev_dependencies:
|
||||
analysis_defaults:
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
#include <file_selector_windows/file_selector_windows.h>
|
||||
#include <menubar/menubar_plugin.h>
|
||||
#include <url_launcher_windows/url_launcher_windows.h>
|
||||
#include <window_size/window_size_plugin.h>
|
||||
|
||||
void RegisterPlugins(flutter::PluginRegistry* registry) {
|
||||
FileSelectorWindowsRegisterWithRegistrar(
|
||||
@@ -18,6 +17,4 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
|
||||
registry->GetRegistrarForPlugin("MenubarPlugin"));
|
||||
UrlLauncherWindowsRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("UrlLauncherWindows"));
|
||||
WindowSizePluginRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("WindowSizePlugin"));
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@ list(APPEND FLUTTER_PLUGIN_LIST
|
||||
file_selector_windows
|
||||
menubar
|
||||
url_launcher_windows
|
||||
window_size
|
||||
)
|
||||
|
||||
list(APPEND FLUTTER_FFI_PLUGIN_LIST
|
||||
|
||||
Reference in New Issue
Block a user