123456789101112131415161718192021222324252627 |
- import 'package:flutter/material.dart';
- import 'package:flutter_provider_demo/provider/car_provider.dart';
- import 'package:flutter_provider_demo/views/carlist.dart';
- import 'package:provider/provider.dart';
- class ReadyCarsTab extends StatelessWidget {
- const ReadyCarsTab({super.key});
- @override
- Widget build(BuildContext context) {
- return Consumer<CarProvider>(
- builder: (context, cars, _) => cars.startedCars.isNotEmpty
- ? CarList(
- cars: cars.startedCars,
- )
- : const Center(
- child: Text(
- 'There are no ready cars',
- style: TextStyle(
- fontSize: 25.0,
- ),
- ),
- ),
- );
- }
- }
|