Skip to content

Instantly share code, notes, and snippets.

@AlabasterAxe
Created November 9, 2020 23:48
Show Gist options
  • Save AlabasterAxe/edfa36ae2149f96e6b25278ad49f433b to your computer and use it in GitHub Desktop.
Save AlabasterAxe/edfa36ae2149f96e6b25278ad49f433b to your computer and use it in GitHub Desktop.
Partial build Method implementation for Flutter Implementation of Google Chrome Dino Game
Rect dinoRect = dino.getRect(screenSize, 0);
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Stack(
alignment: Alignment.center,
children: [
Positioned(
left: dinoRect.left,
top: dinoRect.top,
width: dinoRect.width,
height: dinoRect.height,
child: dino.render(),
)
],
),
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment