2024-10-26 20:53:30 +00:00
|
|
|
import 'package:dialer/features/contacts/contact_state.dart';
|
|
|
|
import 'package:dialer/features/contacts/widgets/alphabet_scroll_page.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:dialer/widgets/loading_indicator.dart';
|
|
|
|
|
|
|
|
class ContactPage extends StatefulWidget {
|
|
|
|
const ContactPage({super.key});
|
|
|
|
|
|
|
|
@override
|
|
|
|
_ContactPageState createState() => _ContactPageState();
|
|
|
|
}
|
|
|
|
|
|
|
|
class _ContactPageState extends State<ContactPage> {
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
final contactState = ContactState.of(context);
|
|
|
|
return Scaffold(
|
|
|
|
body: contactState.loading
|
|
|
|
? const LoadingIndicatorWidget()
|
2024-12-15 18:42:23 +00:00
|
|
|
: AlphabetScrollPage(
|
|
|
|
scrollOffset: contactState.scrollOffset,
|
|
|
|
contacts: contactState.contacts, // Use all contacts here
|
|
|
|
),
|
2024-10-26 20:53:30 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|