mirror of
https://github.com/flutter/samples.git
synced 2026-05-14 02:47:42 +00:00
[Rolodex] Update fidelity of Contact list screens (#2588)
This PR: - Updates the fidelity of the home screen and contact list screens to near full fidelity - Renames "Contact Lists" to "Contact Groups". We have multiple collections of contacts, so having lists of lists felt confusing - Adds more functionality to the data models Comparison of the two screens against native: | Native | Flutter | | --- | --- | | <img width="418" alt="Screenshot 2025-02-19 at 2 59 58 PM" src="https://github.com/user-attachments/assets/1cc53d19-6bb5-4782-82fa-1a62cd75fd51" /> | <img width="397" alt="Screenshot 2025-02-19 at 2 58 54 PM" src="https://github.com/user-attachments/assets/ddab75f2-4aec-4239-a736-690a3185c196" /> | | <img width="409" alt="Screenshot 2025-02-19 at 2 59 41 PM" src="https://github.com/user-attachments/assets/ee0d81ee-ae60-47ad-b071-266f39ce9b70" /> | <img width="402" alt="Screenshot 2025-02-19 at 2 58 45 PM" src="https://github.com/user-attachments/assets/88bf22f9-d8bd-40d7-a9ca-f2ded439de6c" /> | Notably the container widget on the first screen is a placeholder, until a Cupertino collapsable widget is made.
This commit is contained in:
@@ -5,9 +5,9 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import 'data/contact_list.dart';
|
||||
import 'data/contact_group.dart';
|
||||
import 'screens/contacts.dart';
|
||||
import 'screens/lists.dart';
|
||||
import 'screens/contact_groups.dart';
|
||||
|
||||
void main() {
|
||||
runApp(const RolodexApp());
|
||||
@@ -19,16 +19,22 @@ class RolodexApp extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ChangeNotifierProvider(
|
||||
create: (context) => ContactListsModel(),
|
||||
create: (context) => ContactGroupsModel(),
|
||||
child: CupertinoApp(
|
||||
title: 'Rolodex',
|
||||
theme: CupertinoThemeData(
|
||||
barBackgroundColor: CupertinoDynamicColor.withBrightness(
|
||||
color: Color(0xFFF9F9F9),
|
||||
darkColor: Color(0xFF1D1D1D),
|
||||
),
|
||||
),
|
||||
initialRoute: '/contacts',
|
||||
onGenerateInitialRoutes: (initialRoute) {
|
||||
return [
|
||||
CupertinoPageRoute(
|
||||
title: 'Lists',
|
||||
builder: (BuildContext context) {
|
||||
return ListsPage();
|
||||
return ContactGroupsPage();
|
||||
},
|
||||
),
|
||||
CupertinoPageRoute(
|
||||
|
||||
Reference in New Issue
Block a user