Skip to content

upgrade dependencies to the latest version #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
13 changes: 13 additions & 0 deletions example/lib/auto_route/app_router.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import 'package:auto_route/auto_route.dart';
import 'app_router.gr.dart';

@AutoRouterConfig()
class AppRouter extends RootStackRouter {
@override
RouteType get defaultRouteType => const RouteType.adaptive();

@override
List<AutoRoute> get routes => <AutoRoute>[
AutoRoute(page: SplashRoute.page, path: '/', initial: true),
];
}
29 changes: 29 additions & 0 deletions example/lib/auto_route/app_router.gr.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// dart format width=80
// GENERATED CODE - DO NOT MODIFY BY HAND

// **************************************************************************
// AutoRouterGenerator
// **************************************************************************

// ignore_for_file: type=lint
// coverage:ignore-file

// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'package:auto_route/auto_route.dart' as _i2;
import 'package:example/splash_route.dart' as _i1;

/// generated route for
/// [_i1.SplashRoute]
class SplashRoute extends _i2.PageRouteInfo<void> {
const SplashRoute({List<_i2.PageRouteInfo>? children})
: super(SplashRoute.name, initialChildren: children);

static const String name = 'SplashRoute';

static _i2.PageInfo page = _i2.PageInfo(
name,
builder: (data) {
return const _i1.SplashRoute();
},
);
}
30 changes: 30 additions & 0 deletions example/lib/freezed/theme_bloc.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import 'dart:async';

import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:freezed_annotation/freezed_annotation.dart';

part 'theme_bloc.freezed.dart';
part 'theme_event.dart';
part 'theme_state.dart';

class ThemeBloc extends Bloc<ThemeEvent, ThemeState> {
ThemeBloc() : super(_Light()) {
on<_Load>(_loadThemeEvent);
on<_Set>(_setThemeEvent);
}

FutureOr<void> _loadThemeEvent(
_Load event,
Emitter<ThemeState> emit,
) async {
emit(_Light());
}

FutureOr<void> _setThemeEvent(
_Set event,
Emitter<ThemeState> emit,
) async {
emit(_Light());
}
}
Loading