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
4 changes: 2 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:whitenoise/ui/auth_flow/welcome_page.dart';
import 'package:whitenoise/ui/auth_flow/welcome_screen.dart';
import 'package:whitenoise/src/rust/frb_generated.dart';

Future<void> main() async {
Expand Down Expand Up @@ -31,7 +31,7 @@ class MyApp extends StatelessWidget {
title: 'White Noise',
theme: ThemeData.light(),
debugShowCheckedModeBanner: false,
home: const WelcomePage(),
home: const WelcomeScreen(),
);
},
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import 'package:flutter/material.dart';
import 'package:whitenoise/ui/auth_flow/key_created_page.dart';
import 'package:whitenoise/ui/core/themes/colors.dart';
import 'package:whitenoise/ui/auth_flow/key_created_screen.dart';

class CreateProfilePage extends StatefulWidget {
const CreateProfilePage({super.key});
class CreateProfileScreen extends StatefulWidget {
const CreateProfileScreen({super.key});

@override
State<CreateProfilePage> createState() => _CreateProfilePageState();
State<CreateProfileScreen> createState() => _CreateProfileScreenState();
}

class _CreateProfilePageState extends State<CreateProfilePage> {
class _CreateProfileScreenState extends State<CreateProfileScreen> {
final TextEditingController _usernameController = TextEditingController();
final TextEditingController _bioController = TextEditingController();

Expand All @@ -17,14 +18,14 @@ class _CreateProfilePageState extends State<CreateProfilePage> {
_bioController.text.trim();
Navigator.push(
context,
MaterialPageRoute(builder: (_) => const KeyCreatedPage()),
MaterialPageRoute(builder: (_) => const KeyCreatedScreen()),
);
}

@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
backgroundColor: AppColors.white,
resizeToAvoidBottomInset: true,
body: SafeArea(
child: SingleChildScrollView(
Expand All @@ -39,7 +40,7 @@ class _CreateProfilePageState extends State<CreateProfilePage> {
),
),
const SizedBox(height: 32),
const CircleAvatar(backgroundColor: Colors.black, radius: 40),
const CircleAvatar(backgroundColor: AppColors.black, radius: 40),
const SizedBox(height: 12),
const Text(
'Upload photo',
Expand All @@ -59,7 +60,7 @@ class _CreateProfilePageState extends State<CreateProfilePage> {
decoration: InputDecoration(
hintText: 'Enter name...',
filled: true,
fillColor: const Color(0xFFF2F2F2),
fillColor: AppColors.grey1,
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(8),
borderSide: BorderSide.none,
Expand All @@ -82,35 +83,34 @@ class _CreateProfilePageState extends State<CreateProfilePage> {
decoration: InputDecoration(
hintText: 'A quick note about you...',
filled: true,
fillColor: const Color(0xFFF2F2F2),
fillColor: AppColors.grey1,
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(8),
borderSide: BorderSide.none,
),
),
),

const SizedBox(height: 32),
],
),
),
),
bottomNavigationBar: Container(
height: 96,
color: Colors.black,
color: AppColors.black,
padding: const EdgeInsets.only(top: 20),
child: TextButton(
style: ButtonStyle(
splashFactory: NoSplash.splashFactory,
overlayColor: WidgetStateProperty.all(Colors.transparent),
overlayColor: WidgetStateProperty.all(AppColors.transparent),
padding: WidgetStateProperty.all(EdgeInsets.zero),
),
onPressed: _onContinuePressed,
child: const Align(
alignment: Alignment.topCenter,
child: Text(
'Continue',
style: TextStyle(fontSize: 18, color: Colors.white),
style: TextStyle(fontSize: 18, color: AppColors.white),
),
),
),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import 'package:flutter/material.dart';
import 'package:whitenoise/ui/auth_flow/create_profile_page.dart';
import 'package:whitenoise/ui/auth_flow/create_profile_screen.dart';
import 'package:whitenoise/ui/core/themes/colors.dart';

class InfoPage extends StatelessWidget {
const InfoPage({super.key});
class InfoScreen extends StatelessWidget {
const InfoScreen({super.key});

void _onContinuePressed(BuildContext context) {
Navigator.push(
context,
MaterialPageRoute(builder: (_) => const CreateProfilePage()),
MaterialPageRoute(builder: (_) => const CreateProfileScreen()),
);
}

Expand All @@ -19,7 +20,7 @@ class InfoPage extends StatelessWidget {
children: [
const Padding(
padding: EdgeInsets.only(top: 4),
child: CircleAvatar(backgroundColor: Colors.black, radius: 12),
child: CircleAvatar(backgroundColor: AppColors.black, radius: 12),
),
const SizedBox(width: 16),
Expanded(
Expand All @@ -36,7 +37,7 @@ class InfoPage extends StatelessWidget {
const SizedBox(height: 4),
Text(
subtitle,
style: const TextStyle(fontSize: 15, color: Colors.grey),
style: TextStyle(fontSize: 15, color: AppColors.grey3),
),
],
),
Expand All @@ -49,7 +50,7 @@ class InfoPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
backgroundColor: AppColors.white,
body: Stack(
children: [
SafeArea(
Expand Down Expand Up @@ -93,20 +94,20 @@ class InfoPage extends StatelessWidget {
right: 0,
child: Container(
height: 96,
color: Colors.black,
color: AppColors.black,
padding: const EdgeInsets.only(top: 20),
child: TextButton(
style: ButtonStyle(
splashFactory: NoSplash.splashFactory,
overlayColor: WidgetStateProperty.all(Colors.transparent),
overlayColor: WidgetStateProperty.all(AppColors.transparent),
Copy link
Contributor

@coderabbitai coderabbitai bot May 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Verify the WidgetStateProperty usage across the codebase.

The code uses WidgetStateProperty.all() for button overlay color, while in some Flutter versions this should typically be MaterialStateProperty.all(). Please verify that WidgetStateProperty is being used consistently and correctly across all files.


🏁 Script executed:

#!/bin/bash
# Search for both WidgetStateProperty and MaterialStateProperty usage in the codebase
echo "Searching for WidgetStateProperty usage:"
rg "WidgetStateProperty" -A 1 -B 1
echo -e "\nSearching for MaterialStateProperty usage:"
rg "MaterialStateProperty" -A 1 -B 1

Length of output: 2880


Replace WidgetStateProperty with MaterialStateProperty in ButtonStyle

I couldn’t find any definition or import of WidgetStateProperty in the codebase, and Flutter’s ButtonStyle APIs expect MaterialStateProperty. Please update all occurrences:

  • Change
    - overlayColor: WidgetStateProperty.all(AppColors.transparent),
    + overlayColor: MaterialStateProperty.all(AppColors.transparent),
  • And likewise for padding:
    - padding: WidgetStateProperty.all(EdgeInsets.zero),
    + padding: MaterialStateProperty.all(EdgeInsets.zero),

in these files under lib/ui/auth_flow/:

  • create_profile_screen.dart
  • login_screen.dart
  • logged_screen.dart
  • key_created_screen.dart
  • info_screen.dart
  • welcome_screen.dart

Also ensure you have:

import 'package:flutter/material.dart';

so that MaterialStateProperty is available.

🤖 Prompt for AI Agents
In lib/ui/auth_flow/info_screen.dart at line 102, replace the incorrect usage of
WidgetStateProperty.all() with MaterialStateProperty.all() for the button
overlayColor property. Also, verify and update all similar occurrences in the
other listed files under lib/ui/auth_flow/ to use MaterialStateProperty instead
of WidgetStateProperty. Ensure the file imports 'package:flutter/material.dart'
so MaterialStateProperty is recognized.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@untreu2 is this something that needs to be addressed or a false negative by coderabbit?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

padding: WidgetStateProperty.all(EdgeInsets.zero),
),
onPressed: () => _onContinuePressed(context),
child: const Align(
alignment: Alignment.topCenter,
child: Text(
'Continue',
style: TextStyle(fontSize: 18, color: Colors.white),
style: TextStyle(fontSize: 18, color: AppColors.white),
),
),
),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import 'package:flutter/material.dart';
import 'package:whitenoise/ui/auth_flow/logged_page.dart';
import 'package:whitenoise/ui/auth_flow/logged_screen.dart';
import 'package:whitenoise/ui/core/themes/colors.dart';

class KeyCreatedPage extends StatelessWidget {
const KeyCreatedPage({super.key});
class KeyCreatedScreen extends StatelessWidget {
const KeyCreatedScreen({super.key});

void _onContinuePressed(BuildContext context) {
Navigator.pushReplacement(
context,
MaterialPageRoute(builder: (_) => const LoggedInPage()),
MaterialPageRoute(builder: (_) => const LoggedInScreen()),
);
}

Expand All @@ -27,7 +28,7 @@ blah blah blah blah blah blah
''';

return Scaffold(
backgroundColor: Colors.white,
backgroundColor: AppColors.white,
body: Stack(
children: [
SafeArea(
Expand All @@ -46,7 +47,7 @@ blah blah blah blah blah blah
const SizedBox(height: 16),
const Text(
'Store this in a secure location. It’s your main\npassword to this profile and your messages.',
style: TextStyle(fontSize: 16, color: Colors.grey),
style: TextStyle(fontSize: 16, color: AppColors.grey3),
textAlign: TextAlign.center,
),
const SizedBox(height: 32),
Expand All @@ -57,7 +58,7 @@ blah blah blah blah blah blah
horizontal: 16,
),
decoration: BoxDecoration(
color: const Color(0xFFF5F5F5),
color: AppColors.grey1,
borderRadius: BorderRadius.circular(16),
),
child: Column(
Expand All @@ -74,8 +75,8 @@ blah blah blah blah blah blah
height: 48,
child: TextButton(
style: TextButton.styleFrom(
backgroundColor: Colors.black,
foregroundColor: Colors.white,
backgroundColor: AppColors.black,
foregroundColor: AppColors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(24),
),
Expand All @@ -91,7 +92,7 @@ blah blah blah blah blah blah
const Text(
'You can skip now and we’ll remind\nyou to do this later.',
textAlign: TextAlign.center,
style: TextStyle(color: Colors.grey),
style: TextStyle(color: AppColors.grey3),
),
],
),
Expand All @@ -103,20 +104,20 @@ blah blah blah blah blah blah
right: 0,
child: Container(
height: 96,
color: Colors.black,
color: AppColors.black,
padding: const EdgeInsets.only(top: 20),
child: TextButton(
style: ButtonStyle(
splashFactory: NoSplash.splashFactory,
overlayColor: WidgetStateProperty.all(Colors.transparent),
overlayColor: WidgetStateProperty.all(AppColors.transparent),
padding: WidgetStateProperty.all(EdgeInsets.zero),
),
onPressed: () => _onContinuePressed(context),
child: const Align(
alignment: Alignment.topCenter,
child: Text(
'Continue',
style: TextStyle(fontSize: 18, color: Colors.white),
style: TextStyle(fontSize: 18, color: AppColors.white),
),
),
),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import 'package:flutter/material.dart';
import 'package:whitenoise/ui/core/themes/colors.dart';

class LoggedInPage extends StatelessWidget {
const LoggedInPage({super.key});
class LoggedInScreen extends StatelessWidget {
const LoggedInScreen({super.key});

void _onContinuePressed(BuildContext context) {}

@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
backgroundColor: AppColors.white,
body: Stack(
children: [
SafeArea(
Expand All @@ -33,7 +34,7 @@ class LoggedInPage extends StatelessWidget {
child: Text(
'Let’s see if you already have previous activity.',
textAlign: TextAlign.center,
style: TextStyle(fontSize: 16, color: Colors.grey),
style: TextStyle(fontSize: 16, color: AppColors.grey3),
),
),
const SizedBox(height: 48),
Expand All @@ -44,7 +45,7 @@ class LoggedInPage extends StatelessWidget {
),
margin: const EdgeInsets.only(bottom: 16),
decoration: BoxDecoration(
color: Colors.black,
color: AppColors.black,
borderRadius: BorderRadius.circular(12),
),
child: const Row(
Expand All @@ -54,13 +55,16 @@ class LoggedInPage extends StatelessWidget {
width: 20,
child: CircularProgressIndicator(
strokeWidth: 2,
color: Colors.white,
color: AppColors.white,
),
),
SizedBox(width: 12),
Text(
'Looking for your contacts',
style: TextStyle(fontSize: 16, color: Colors.white),
style: TextStyle(
fontSize: 16,
color: AppColors.white,
),
),
],
),
Expand All @@ -71,7 +75,7 @@ class LoggedInPage extends StatelessWidget {
horizontal: 20,
),
decoration: BoxDecoration(
color: Colors.black,
color: AppColors.black,
borderRadius: BorderRadius.circular(12),
),
child: const Row(
Expand All @@ -81,13 +85,16 @@ class LoggedInPage extends StatelessWidget {
width: 20,
child: CircularProgressIndicator(
strokeWidth: 2,
color: Colors.white,
color: AppColors.white,
),
),
SizedBox(width: 12),
Text(
'Looking for chats',
style: TextStyle(fontSize: 16, color: Colors.white),
style: TextStyle(
fontSize: 16,
color: AppColors.white,
),
),
],
),
Expand All @@ -102,20 +109,20 @@ class LoggedInPage extends StatelessWidget {
right: 0,
child: Container(
height: 96,
color: Colors.black,
color: AppColors.black,
padding: const EdgeInsets.only(top: 20),
child: TextButton(
style: ButtonStyle(
splashFactory: NoSplash.splashFactory,
overlayColor: WidgetStateProperty.all(Colors.transparent),
overlayColor: WidgetStateProperty.all(AppColors.transparent),
padding: WidgetStateProperty.all(EdgeInsets.zero),
),
onPressed: () => _onContinuePressed(context),
child: const Align(
alignment: Alignment.topCenter,
child: Text(
'Continue',
style: TextStyle(fontSize: 18, color: Colors.white),
style: TextStyle(fontSize: 18, color: AppColors.white),
),
),
),
Expand Down
Loading