Skip to content

Instantly share code, notes, and snippets.

@jtmuller5
Created April 29, 2021 15:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jtmuller5/e1cc7264e74f32efe24c51ee335ad2a9 to your computer and use it in GitHub Desktop.
Save jtmuller5/e1cc7264e74f32efe24c51ee335ad2a9 to your computer and use it in GitHub Desktop.
GestureDetector(
onTap: () {
model.setInteraction(false);
},
behavior: HitTestBehavior.deferToChild,
child: InteractiveViewer(
panEnabled: false,
boundaryMargin: EdgeInsets.all(80),
onInteractionStart: (details) {
model.setInteraction(true);
},
onInteractionEnd: (details) {
model.setInteraction(false);
},
minScale: 0.5,
maxScale: 4,
child: Transform.scale(
scale: .85,
child: Stack(
children: [
Center(
child: Container(
height: systemService.screenHeight(context) - 16,
width: systemService.screenWidth(context) - 32,
child: IgnorePointer(ignoring: model.interacting, child: BodyCanvas()),
),
),
],
),
),
),
),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment