Comments (7)
from audio_player_flutter.
@levitnudi Thanks for the report!
We just need to update this project to support flutter 2.0.0+. Feel free to do so and fire a PR if you have time.
I'll review it 😉
from audio_player_flutter.
from audio_player_flutter.
@levitnudi Not problem at all! You probably can start from here https://dart.dev/null-safety/migration-guide.
from audio_player_flutter.
I managed to migrate thanks to the link you provided. It just brought a few more errors which you might want to look into in the future. Thanks!. See below stack trace
Launching lib\main.dart on XXXXXXX in debug mode...
Running Gradle task 'assembleDebug'...
lib/src/app/common/blocs/app_bloc_delegate.dart:4:31: Error: Type 'BlocDelegate' not found.
class AppBlocDelegate extends BlocDelegate {
^^^^^^^^^^^^
lib/src/configurations/app_common_configs.dart:19:7: Error: Getter not found: 'BlocSupervisor'.
BlocSupervisor.delegate = AppBlocDelegate();
^^^^^^^^^^^^^^
lib/src/app/common/blocs/app_bloc_delegate.dart:11:11: Error: Superclass has no method named 'onError'.
super.onError(bloc, error, stacktrace);
^^^^^^^
lib/src/app/common/blocs/app_bloc_delegate.dart:17:11: Error: Superclass has no method named 'onEvent'.
super.onEvent(bloc, event);
^^^^^^^
lib/src/app/common/blocs/app_bloc_delegate.dart:26:11: Error: Superclass has no method named 'onTransition'.
super.onTransition(bloc, transition);
^^^^^^^^^^^^
lib/src/app/features/audio_player/screens/audio_player.dart:43:37: Error: The method 'bloc' isn't defined for the class 'BuildContext'.
- 'BuildContext' is from 'package:flutter/src/widgets/framework.dart' ('../../Documents/flutter/packages/flutter/lib/src/widgets/framework.dart').
Try correcting the name to the name of an existing method, or defining a method named 'bloc'.
context.bloc().stop();
^^^^
lib/src/app/features/audio_player/screens/audio_player.dart:77:39: Error: The method 'bloc' isn't defined for the class 'BuildContext'. - 'BuildContext' is from 'package:flutter/src/widgets/framework.dart' ('../../Documents/flutter/packages/flutter/lib/src/widgets/framework.dart').
Try correcting the name to the name of an existing method, or defining a method named 'bloc'.
bloc: context.bloc(),
^^^^
lib/src/app/features/audio_player/screens/audio_player.dart:90:40: Error: The method 'bloc' isn't defined for the class 'BuildContext'. - 'BuildContext' is from 'package:flutter/src/widgets/framework.dart' ('../../Documents/flutter/packages/flutter/lib/src/widgets/framework.dart').
Try correcting the name to the name of an existing method, or defining a method named 'bloc'.
.bloc()
^^^^
lib/src/app/features/audio_player/screens/audio_player.dart:112:45: Error: The method 'bloc' isn't defined for the class 'BuildContext'. - 'BuildContext' is from 'package:flutter/src/widgets/framework.dart' ('../../Documents/flutter/packages/flutter/lib/src/widgets/framework.dart').
Try correcting the name to the name of an existing method, or defining a method named 'bloc'.
stream: context.bloc(),
^^^^
lib/src/app/features/audio_player/screens/audio_player.dart:115:34: Error: The method 'bloc' isn't defined for the class 'BuildContext'. - 'BuildContext' is from 'package:flutter/src/widgets/framework.dart' ('../../Documents/flutter/packages/flutter/lib/src/widgets/framework.dart').
Try correcting the name to the name of an existing method, or defining a method named 'bloc'.
.bloc()
^^^^
lib/src/app/features/audio_player/screens/audio_player.dart:119:45: Error: The method 'bloc' isn't defined for the class 'BuildContext'. - 'BuildContext' is from 'package:flutter/src/widgets/framework.dart' ('../../Documents/flutter/packages/flutter/lib/src/widgets/framework.dart').
Try correcting the name to the name of an existing method, or defining a method named 'bloc'.
stream: context.bloc(),
^^^^
lib/src/app/features/audio_player/screens/audio_player.dart:122:34: Error: The method 'bloc' isn't defined for the class 'BuildContext'. - 'BuildContext' is from 'package:flutter/src/widgets/framework.dart' ('../../Documents/flutter/packages/flutter/lib/src/widgets/framework.dart').
Try correcting the name to the name of an existing method, or defining a method named 'bloc'.
.bloc()
^^^^
lib/src/app/features/audio_player/screens/audio_player.dart:126:45: Error: The method 'bloc' isn't defined for the class 'BuildContext'. - 'BuildContext' is from 'package:flutter/src/widgets/framework.dart' ('../../Documents/flutter/packages/flutter/lib/src/widgets/framework.dart').
Try correcting the name to the name of an existing method, or defining a method named 'bloc'.
stream: context.bloc(),
^^^^
lib/src/app/features/audio_player/screens/audio_player.dart:129:34: Error: The method 'bloc' isn't defined for the class 'BuildContext'. - 'BuildContext' is from 'package:flutter/src/widgets/framework.dart' ('../../Documents/flutter/packages/flutter/lib/src/widgets/framework.dart').
Try correcting the name to the name of an existing method, or defining a method named 'bloc'.
.bloc()
^^^^
lib/src/services/networking/api_service.dart:21:24: Error: The argument type 'String' can't be assigned to the parameter type 'Uri'. - 'Uri' is from 'dart:core'.
'$_baseUrl/tunes',
^
lib/src/app/features/audio_player/blocs/audio_player_bloc.dart:7:7: Error: The superclass, 'Bloc', has no unnamed constructor that takes no arguments.
class AudioPlayerBloc extends Bloc<PlayerEvent, PlayerState> {
^
lib/src/app/features/explore/blocs/explore_bloc.dart:6:7: Error: The superclass, 'Bloc', has no unnamed constructor that takes no arguments.
class ExploreBloc extends Bloc<ExploreEvent, ExploreState> {
^
FAILURE: Build failed with an exception.
-
Where:
Script 'C:\Users\LN\Documents\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1035 -
What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
Process 'command 'C:\Users\LN\Documents\flutter\bin\flutter.bat'' finished with non-zero exit value 1
-
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. -
Get more help at https://help.gradle.org
BUILD FAILED in 1m 30s
Exception: Gradle task assembleDebug failed with exit code 1
from audio_player_flutter.
@levitnudi Great, thanks! We need to migrate this bloc, HTTP pubs too.
Here where you can start
https://bloclibrary.dev/#/fluttercountertutorial?id=blocobserver
https://pub.dev/packages/http
from audio_player_flutter.
from audio_player_flutter.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from audio_player_flutter.