fastyle_pricing 1.45.0 fastyle_pricing: ^1.45.0 copied to clipboard
A set of pricing widgets for the fastyle library.
// Flutter imports:
import 'package:flutter/material.dart';
// Package imports:
import 'package:fastyle_core/fastyle_core.dart';
import 'package:go_router/go_router.dart';
// Project imports:
import './pages/plan_summary_cards.page.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return FastApp(
routesForMediaType: (mediaType) => [
GoRoute(
path: '/',
builder: (_, __) => const HomePage(),
),
],
);
}
}
class HomePage extends StatelessWidget {
const HomePage({super.key});
@override
Widget build(BuildContext context) {
return FastSectionPage(
titleText: 'Fastyle Pricing Demo',
contentPadding: EdgeInsets.zero,
child: FastNavigationListView(
onSelectionChanged: (FastItem<dynamic> item) {
if (item.value == 'summary') {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const PlanSummaryCardsPage()),
);
}
},
items: const [
FastItem(labelText: 'Plan Summary cards', value: 'summary'),
FastItem(labelText: 'Plan Detail cards', value: 'detail'),
],
),
);
}
}