Skip to content

Commit 60c5245

Browse files
chrisbobbegnprice
authored andcommitted
login [nfc]: Reorder members of LoginPage
Greg points out, referring to the Flutter style guide at https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#order-other-class-members-in-a-way-that-makes-sense : #600 (comment) > I think it's likely helpful to treat [`buildRoute`] for the > ordering as if it does return the class's type, though. It plays > pretty much the role of a factory constructor — it's the thing > that application code, at least, should always use instead of > calling the actual constructor directly. (Possibly we should even > make the constructor private when we have a `buildRoute` method > like this; but that might be annoying in tests.)
1 parent 1bd1fd7 commit 60c5245

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/widgets/login.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,13 +238,13 @@ class _AddAccountPageState extends State<AddAccountPage> {
238238
class LoginPage extends StatefulWidget {
239239
const LoginPage({super.key, required this.serverSettings});
240240

241-
final GetServerSettingsResult serverSettings;
242-
243241
static Route<void> buildRoute({required GetServerSettingsResult serverSettings}) {
244242
return _LoginSequenceRoute(
245243
page: LoginPage(serverSettings: serverSettings));
246244
}
247245

246+
final GetServerSettingsResult serverSettings;
247+
248248
@override
249249
State<LoginPage> createState() => _LoginPageState();
250250
}

0 commit comments

Comments
 (0)