mirror of
https://github.com/flutter/samples.git
synced 2026-07-15 13:32:35 +00:00
Flutter 3.29 beta (#2571)
This commit is contained in:
@@ -12,10 +12,7 @@ import '../view_models/booking_viewmodel.dart';
|
||||
import 'booking_header.dart';
|
||||
|
||||
class BookingBody extends StatelessWidget {
|
||||
const BookingBody({
|
||||
super.key,
|
||||
required this.viewModel,
|
||||
});
|
||||
const BookingBody({super.key, required this.viewModel});
|
||||
|
||||
final BookingViewModel viewModel;
|
||||
|
||||
@@ -30,13 +27,10 @@ class BookingBody extends StatelessWidget {
|
||||
slivers: [
|
||||
SliverToBoxAdapter(child: BookingHeader(booking: booking)),
|
||||
SliverList(
|
||||
delegate: SliverChildBuilderDelegate(
|
||||
(context, index) {
|
||||
final activity = booking.activity[index];
|
||||
return _Activity(activity: activity);
|
||||
},
|
||||
childCount: booking.activity.length,
|
||||
),
|
||||
delegate: SliverChildBuilderDelegate((context, index) {
|
||||
final activity = booking.activity[index];
|
||||
return _Activity(activity: activity);
|
||||
}, childCount: booking.activity.length),
|
||||
),
|
||||
const SliverToBoxAdapter(child: SizedBox(height: 200)),
|
||||
],
|
||||
@@ -47,9 +41,7 @@ class BookingBody extends StatelessWidget {
|
||||
}
|
||||
|
||||
class _Activity extends StatelessWidget {
|
||||
const _Activity({
|
||||
required this.activity,
|
||||
});
|
||||
const _Activity({required this.activity});
|
||||
|
||||
final Activity activity;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user