12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- import 'package:flutter/material.dart';
- import 'package:flutter_cocktail/model/config.dart';
- class DrinkDetail extends StatelessWidget {
- final drink;
- const DrinkDetail({super.key, required this.drink});
- @override
- Widget build(BuildContext context) {
- return Container(
- decoration: const BoxDecoration(
- gradient: LinearGradient(colors: [
- myColor,
- Colors.orange,
- ])),
- child: Scaffold(
- backgroundColor: Colors.transparent,
- appBar: AppBar(
- backgroundColor: Colors.transparent,
- title: Text(drink["strDrink"]),
- elevation: 0.0,
- ),
- body: Center(
- child: Column(
- mainAxisAlignment: MainAxisAlignment.center,
- children: <Widget>[
- Hero(
- tag: drink["idDrink"],
- child: CircleAvatar(
- radius: 100.0,
- backgroundImage: NetworkImage(
- drink["strDrinkThumb"],
- ),
- ),
- ),
- const SizedBox(
- height: 30.0,
- ),
- Text(
- "ID: ${drink["idDrink"]}",
- style: const TextStyle(
- color: Colors.white,
- ),
- ),
- const SizedBox(
- height: 30.0,
- ),
- Text(
- "${drink["strDrink"]}",
- style: const TextStyle(
- fontSize: 22,
- color: Colors.white,
- ),
- )
- ],
- ),
- ),
- ),
- );
- }
- }
|