Skip to content

Instantly share code, notes, and snippets.

@red-star25
Created September 26, 2021 14:25
Show Gist options
  • Save red-star25/7e5708e4d72cf70964e0b796900d0537 to your computer and use it in GitHub Desktop.
Save red-star25/7e5708e4d72cf70964e0b796900d0537 to your computer and use it in GitHub Desktop.
class MyHomePage extends StatefulWidget {
const MyHomePage({Key? key}) : super(key: key);
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> with TickerProviderStateMixin {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Stack(
children: [
Image.asset(
"assets/images/area.jpg",
fit: BoxFit.cover,
height: double.infinity,
width: double.infinity,
),
Transform.translate(
offset: const Offset(180.0, 100.0),
child: Image.asset(
"assets/images/basketball.png",
height: 70,
width: 70,
fit: BoxFit.contain,
),
)
],
));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment