1 | initial version |
Yes, Flutter provides Cupertino-themed ListTile and Card components that can be used in your application. These components follow the design guidelines of the Cupertino iOS style and provide a seamless experience for iOS users. To use these components, you need to import the 'cupertino_icons' package in your application and use the 'CupertinoListTile' and 'CupertinoCard' classes to create the widgets. Here is an example:
import 'package:flutter/cupertino.dart';
import 'package:cupertino_icons/cupertino_icons.dart';
class MyHomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return CupertinoPageScaffold(
navigationBar: CupertinoNavigationBar(
middle: Text('My App'),
),
child: SafeArea(
child: ListView(
children: <Widget>[
CupertinoListTile(
leading: Icon(CupertinoIcons.home),
title: Text('Home'),
subtitle: Text('Go to Home Page'),
trailing: Icon(CupertinoIcons.forward),
onTap: () {},
),
CupertinoDivider(),
CupertinoListTile(
leading: Icon(CupertinoIcons.profile_circled),
title: Text('Profile'),
subtitle: Text('View your Profile'),
trailing: Icon(CupertinoIcons.forward),
onTap: () {},
),
CupertinoDivider(),
CupertinoCard(
child: Column(
children: <Widget>[
Text('Hello, World!'),
CupertinoButton(
child: Text('Learn More'),
onPressed: () {},
),
],
),
),
],
),
),
);
}
}