1
0
mirror of https://github.com/flutter/samples.git synced 2026-05-17 12:28:16 +00:00

Remove code_sharing and place_tracker, cleanup repo (#2831)

Fixes #2818, #2523, #2528
This commit is contained in:
Eric Windmill
2026-04-15 13:02:16 -07:00
committed by GitHub
parent d626e058a4
commit d66d8c49b5
295 changed files with 82 additions and 9279 deletions

View File

@@ -1,38 +1,14 @@
// Copyright 2021, the Flutter project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'dart:io' show Platform;
import 'package:flutter/foundation.dart' show kIsWeb;
import 'package:flutter/material.dart';
import 'package:window_size/window_size.dart';
import 'src/app.dart';
void main() {
setupWindow();
// Removed setupWindow() call
runApp(const Bookstore());
}
const double windowWidth = 480;
const double windowHeight = 854;
void setupWindow() {
if (!kIsWeb &&
(Platform.isWindows || Platform.isLinux || Platform.isMacOS)) {
WidgetsFlutterBinding.ensureInitialized();
setWindowTitle('Navigation and routing');
setWindowMinSize(const Size(windowWidth, windowHeight));
setWindowMaxSize(const Size(windowWidth, windowHeight));
getCurrentScreen().then((screen) {
setWindowFrame(
Rect.fromCenter(
center: screen!.frame.center,
width: windowWidth,
height: windowHeight,
),
);
});
}
}

View File

@@ -73,8 +73,6 @@ class _BookstoreState extends State<Bookstore> {
pageBuilder: (context, state, child) {
return FadeTransitionPage<dynamic>(
key: state.pageKey,
// Use a builder to get the correct BuildContext
// TODO (johnpryan): remove when https://github.com/flutter/flutter/issues/108177 lands
child: Builder(
builder: (context) {
return BooksScreen(
@@ -103,8 +101,6 @@ class _BookstoreState extends State<Bookstore> {
path: '/books/popular',
pageBuilder: (context, state) {
return FadeTransitionPage<dynamic>(
// Use a builder to get the correct BuildContext
// TODO (johnpryan): remove when https://github.com/flutter/flutter/issues/108177 lands
key: state.pageKey,
child: Builder(
builder: (context) {
@@ -139,8 +135,6 @@ class _BookstoreState extends State<Bookstore> {
pageBuilder: (context, state) {
return FadeTransitionPage<dynamic>(
key: state.pageKey,
// Use a builder to get the correct BuildContext
// TODO (johnpryan): remove when https://github.com/flutter/flutter/issues/108177 lands
child: Builder(
builder: (context) {
return BookList(
@@ -174,8 +168,6 @@ class _BookstoreState extends State<Bookstore> {
pageBuilder: (context, state) {
return FadeTransitionPage<dynamic>(
key: state.pageKey,
// Use a builder to get the correct BuildContext
// TODO (johnpryan): remove when https://github.com/flutter/flutter/issues/108177 lands
child: Builder(
builder: (context) {
return BookList(
@@ -234,7 +226,6 @@ class _BookstoreState extends State<Bookstore> {
int.parse(state.pathParameters['authorId']!),
);
// Use a builder to get the correct BuildContext
// TODO (johnpryan): remove when https://github.com/flutter/flutter/issues/108177 lands
return Builder(
builder: (context) {
return AuthorDetailsScreen(
@@ -266,7 +257,6 @@ class _BookstoreState extends State<Bookstore> {
path: '/sign-in',
builder: (context, state) {
// Use a builder to get the correct BuildContext
// TODO (johnpryan): remove when https://github.com/flutter/flutter/issues/108177 lands
return Builder(
builder: (context) {
return SignInScreen(