-
Notifications
You must be signed in to change notification settings - Fork 14
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
Null Sound Safety Migration #43
Comments
Yes. I plan to upgrade all my packages to null-safety. |
Ok so. I'm now currently migrating this to null-safety. |
All unit tests need to pass without any edits in the test codes. |
Okay so. This is harder than I've thought. |
Migrated to null safety now! dependencies:
# other deps here
momentum:
git:
url: https://github.com/xamantra/momentum.git
ref: 5ed04cba9e859ba3802ed02a7dc24b1f84c4de27
# other deps here There are still some important things that need to be updated before publishing to pub.dev. Like updating readme to have null safe code, the entire docs website, and the comment docs. |
Null safety is now available on pub.dev dependencies:
momentum: ^2.0.0 |
@xamantra not sure if it's me trying to use it for desktop (windows) or if it's momentum itself, but I'm getting this error error
code import 'package:flutter/material.dart';
import 'package:momentum/momentum.dart';
import 'package:tfx/screens/index_screen.dart';
void main() {
// runApp(MyApp());
runApp(Momentum(
disabledPersistentState: true,
controllers: [],
services: [
MomentumRouter([
IndexScreen(),
])
],
));
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'TFX',
theme: ThemeData(
primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity,
),
home: IndexScreen(),
);
}
} import 'package:flutter/material.dart';
class IndexScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("TFX"),
),
body: Container(
child: Center(
child: Text("Body"),
),
),
);
}
} It's been a while since I played with momentum, not sure if every screen needs to be a momentum state or not |
Oh I'm an idiot, I now know what happened. So before I was using 1.3.x and was trying to figure out why it was derping out. I think I was commenting stuff out to try finding the bug (problem was null safety) then noticed 2.0 was out. And forgot to uncomment that back 😂 |
Do you plan to support null safety?
The text was updated successfully, but these errors were encountered: