Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion examples/animation/animate3/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,4 @@ class _LogoAppState extends State<LogoApp> with SingleTickerProviderStateMixin {

// #docregion print-state
}

// #enddocregion print-state
1 change: 0 additions & 1 deletion examples/animation/animate4/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,4 @@ class _LogoAppState extends State<LogoApp> with SingleTickerProviderStateMixin {

// #docregion print-state
}

// #enddocregion print-state
2 changes: 1 addition & 1 deletion examples/animation/animate5/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import 'dart:math';

// #enddocregion ShakeCurve

import 'package:flutter/material.dart';

void main() => runApp(const LogoApp());
Expand Down Expand Up @@ -133,5 +134,4 @@ class ShakeCurve extends Curve {
@override
double transform(double t) => sin(t * pi * 2);
}

// #enddocregion ShakeCurve
2 changes: 0 additions & 2 deletions examples/app-architecture/command/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ class _MainAppState extends State<MainApp> {
// Show Snackbar
}
}

// #enddocregion _onViewModelChanged
}

Expand Down Expand Up @@ -175,5 +174,4 @@ class Command extends ChangeNotifier {
_completed = false;
}
}

// #enddocregion Command
2 changes: 0 additions & 2 deletions examples/app-architecture/command/lib/no_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ class _MainAppState extends State<MainApp> {
// Show Snackbar
}
}

// #enddocregion _onViewModelChanged
}

Expand Down Expand Up @@ -142,5 +141,4 @@ class HomeViewModel3 extends ChangeNotifier {
// edit user
}
}

// #enddocregion HomeViewModel3
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,4 @@ class HomeViewModel extends ChangeNotifier {
// load user
}
}

// #enddocregion ViewModel
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,5 @@ class UserProfileRepository {
// Try again later
}
}

// #enddocregion sync
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,4 @@ class ApiClientService {
// #docregion ApiClientService
}
}

// #enddocregion ApiClientService
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,4 @@ class DatabaseService {
// #docregion DatabaseService
}
}

// #enddocregion DatabaseService
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ abstract class UserProfile with _$UserProfile {
@Default(false) bool synchronized,
}) = _UserProfile;
}

// #enddocregion UserProfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,4 @@ class UserProfileViewModel extends ChangeNotifier {
// #docregion UserProfileViewModel
}
}

// #enddocregion UserProfileViewModel
3 changes: 0 additions & 3 deletions examples/app-architecture/optimistic_state/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ class _SubscribeButtonState extends State<SubscribeButton> {
).showSnackBar(const SnackBar(content: Text('Failed to subscribe')));
}
}

// #enddocregion listener2
}

Expand Down Expand Up @@ -150,7 +149,6 @@ class SubscribeButtonViewModel extends ChangeNotifier {
notifyListeners();
}
}

// #enddocregion subscribe
}
// #enddocregion ViewModelFull
Expand All @@ -166,5 +164,4 @@ class SubscriptionRepository {
throw Exception('Failed to subscribe');
}
}

// #enddocregion SubscriptionRepository
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@ class _SubscribeButtonState extends State<SubscribeButton> {
class SubscribeButtonViewModel extends ChangeNotifier {}

class SubscriptionRepository {}

// #enddocregion Starter
1 change: 0 additions & 1 deletion examples/app-architecture/result/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ class UserProfileRepository {

return Result.error(Exception('Failed to get user profile'));
}

// #enddocregion getUserProfile
}

Expand Down
1 change: 0 additions & 1 deletion examples/app-architecture/result/lib/result.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,4 @@ final class Error<T> extends Result<T> {
@override
String toString() => 'Result<$T>.error($error)';
}

// #enddocregion Result
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ abstract class Todo with _$Todo {
required String task,
}) = _Todo;
}

// #enddocregion Todo
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,4 @@ class ThemeRepository {
/// ViewModels should call [isDarkMode] to get the current theme setting.
Stream<bool> observeDarkMode() => _darkModeController.stream;
}

// #enddocregion ThemeRepository
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,4 @@ class TodoRepository {
return _database.delete(id);
}
}

// #enddocregion TodoRepository
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@ class SharedPreferencesService {
return prefs.getBool(_kDarkMode) ?? false;
}
}

// #enddocregion SharedPreferencesService
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,4 @@ class MainAppViewModel extends ChangeNotifier {
super.dispose();
}
}

// #enddocregion MainAppViewModel
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,4 @@ class ThemeSwitchViewModel extends ChangeNotifier {
return result;
}
}

// #enddocregion ThemeSwitchViewModel
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,4 @@ class ThemeSwitch extends StatelessWidget {
);
}
}

// #enddocregion ThemeSwitch
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,5 @@ class TodoListViewModel extends ChangeNotifier {
notifyListeners();
}
}

// #enddocregion Delete
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,5 @@ class _TodoListScreenState extends State<TodoListScreen> {
_controller.clear();
}
}

// #enddocregion Add
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,4 @@ class _AnimatedContainerAppState extends State<AnimatedContainerApp> {
return Container();
}
}

// #enddocregion Starter
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ignore_for_file: prefer_final_fields, unused_field

import 'package:flutter/material.dart';
// ignore_for_file: prefer_final_fields
// ignore_for_file: unused_field

// #docregion Starter
// The StatefulWidget's job is to take data and create a State class.
Expand All @@ -26,5 +26,4 @@ class _MyHomePageState extends State<MyHomePage> {
return Container();
}
}

// #enddocregion Starter
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
// #docregion import
import 'package:flutter/physics.dart';

// #enddocregion import

void main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,5 @@ class _DraggableCardState extends State<DraggableCard>
Widget build(BuildContext context) {
return Align(child: Card(child: widget.child));
}

// #enddocregion build
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,5 @@ class _DraggableCardState extends State<DraggableCard>
);
// #enddocregion gesture
}

// #enddocregion build
}
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,5 @@ class _DraggableCardState extends State<DraggableCard>
_controller.reset();
_controller.forward();
}

// #enddocregion runAnimation
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@ void main() {
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
runApp(const MyApp());
}

// #enddocregion PreferredOrientations
Original file line number Diff line number Diff line change
Expand Up @@ -151,5 +151,4 @@ class DownloadButton extends StatelessWidget {
);
}
}

// #enddocregion TapCallbacks
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,4 @@ class ButtonShapeWidget extends StatelessWidget {
);
}
}

// #enddocregion Display
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,4 @@ class ButtonShapeWidget extends StatelessWidget {
);
}
}

// #enddocregion DisplayText
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,5 @@ class DownloadButton extends StatelessWidget {
),
);
}

// #enddocregion Spinner
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ class DownloadButton extends StatelessWidget {
return const SizedBox();
}
}

// #enddocregion DownloadButton
1 change: 0 additions & 1 deletion examples/cookbook/effects/download_button/lib/stop.dart
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,5 @@ class DownloadButton extends StatelessWidget {
),
);
}

// #enddocregion StopIcon
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,4 @@ class DownloadButton extends StatelessWidget {
return const SizedBox();
}
}

// #enddocregion VisualStates
1 change: 0 additions & 1 deletion examples/cookbook/effects/drag_a_widget/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -389,5 +389,4 @@ class Customer {
return '\$${(totalPriceCents / 100.0).toStringAsFixed(2)}';
}
}

// #enddocregion CustomerClass
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,4 @@ class _ExpandableFabState extends State<ExpandableFab> {
return const SizedBox();
}
}

// #enddocregion ExpandableFab
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,4 @@ class _ExpandableFabState extends State<ExpandableFab> {
);
}
}

// #enddocregion ExpandableFabState
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,5 @@ class SetupFlowState extends State<SetupFlow> {
title: const Text('Bulb Setup'),
);
}

// #enddocregion PromptUser
}
1 change: 0 additions & 1 deletion examples/cookbook/effects/nested_nav/lib/setupflow.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@ class SetupFlowState extends State<SetupFlow> {
return const SizedBox();
}
}

// #enddocregion SetupFlow
1 change: 0 additions & 1 deletion examples/cookbook/effects/nested_nav/lib/setupflow2.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,5 @@ class SetupFlowState extends State<SetupFlow> {
PreferredSizeWidget _buildFlowAppBar() {
return AppBar(title: const Text('Bulb Setup'));
}

// #enddocregion SetupFlow2
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@ class ParallaxRecipe extends StatelessWidget {
return const SingleChildScrollView(child: Column(children: []));
}
}

// #enddocregion ParallaxRecipe
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,4 @@ class LocationListItem extends StatelessWidget {
);
}
}

// #enddocregion LocationListItem
2 changes: 0 additions & 2 deletions examples/cookbook/effects/parallax_scrolling/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ class ParallaxFlowDelegate extends FlowDelegate {
required this.listItemContext,
required this.backgroundImageKey,
}) : super(repaint: scrollable.position);

// #enddocregion SuperScrollPosition

final ScrollableState scrollable;
Expand Down Expand Up @@ -197,7 +196,6 @@ class ParallaxFlowDelegate extends FlowDelegate {
listItemContext != oldDelegate.listItemContext ||
backgroundImageKey != oldDelegate.backgroundImageKey;
}

// #enddocregion ShouldRepaint
}

Expand Down
1 change: 0 additions & 1 deletion examples/cookbook/effects/shimmer_loading/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -191,5 +191,4 @@ class _ExampleUiLoadingAnimationState extends State<ExampleUiLoadingAnimation> {
);
}
}

// #enddocregion ExampleUiAnimationState
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,4 @@ class ShimmerState extends State<Shimmer> {
return widget.child ?? const SizedBox();
}
}

// #enddocregion ShimmerState
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,4 @@ class _MenuState extends State<Menu> with SingleTickerProviderStateMixin {

// #docregion delays
}

// #enddocregion delays
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,4 @@ class _MenuState extends State<Menu> {
);
}
}

// #enddocregion step1
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,4 @@ class _MenuState extends State<Menu> with SingleTickerProviderStateMixin {

// #docregion animation-controller
}

// #enddocregion animation-controller
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,4 @@ class _MenuState extends State<Menu> with SingleTickerProviderStateMixin {
];
// #docregion step3
}

// #enddocregion step3
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,5 @@ class _MenuState extends State<Menu> with SingleTickerProviderStateMixin {
),
);
}

// #enddocregion build-get-started
}
Loading
Loading