text stringlengths 1 474 |
|---|
ClipRRect( |
borderRadius: BorderRadius.circular(12), |
child: SizedBox( |
width: 120, |
height: 120, |
child: Center( |
child: AnimatedContainer( |
duration: const Duration(milliseconds: 100), |
curve: Curves.easeInOut, |
height: isDepressed ? 115 : 120, |
width: isDepressed ? 115 : 120, |
child: Image( |
image: photoProvider, |
fit: BoxFit.cover, |
), |
), |
), |
), |
), |
const SizedBox(width: 30), |
Expanded( |
child: Column( |
crossAxisAlignment: CrossAxisAlignment.start, |
children: [ |
Text( |
name, |
style: Theme.of(context).textTheme.titleMedium?.copyWith( |
fontSize: 18, |
), |
), |
const SizedBox(height: 10), |
Text( |
price, |
style: Theme.of(context).textTheme.titleMedium?.copyWith( |
fontWeight: FontWeight.bold, |
fontSize: 18, |
), |
), |
], |
), |
), |
], |
), |
), |
); |
} |
} |
class DraggingListItem extends StatelessWidget { |
const DraggingListItem({ |
super.key, |
required this.dragKey, |
required this.photoProvider, |
}); |
final GlobalKey dragKey; |
final ImageProvider photoProvider; |
@override |
Widget build(BuildContext context) { |
return FractionalTranslation( |
translation: const Offset(-0.5, -0.5), |
child: ClipRRect( |
key: dragKey, |
borderRadius: BorderRadius.circular(12), |
child: SizedBox( |
height: 150, |
width: 150, |
child: Opacity( |
opacity: 0.85, |
child: Image( |
image: photoProvider, |
fit: BoxFit.cover, |
), |
), |
), |
), |
); |
} |
} |
@immutable |
class Item { |
const Item({ |
required this.totalPriceCents, |
required this.name, |
required this.uid, |
required this.imageProvider, |
}); |
final int totalPriceCents; |
final String name; |
final String uid; |
final ImageProvider imageProvider; |
String get formattedTotalItemPrice => |
'\$${(totalPriceCents / 100.0).toStringAsFixed(2)}'; |
} |
class Customer { |
Customer({ |
required this.name, |
required this.imageProvider, |
List<Item>? items, |
}) : items = items ?? []; |
final String name; |
final ImageProvider imageProvider; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.