Created
August 11, 2020 02:01
-
-
Save AlexV525/8d0a14b9b489548f833c2ad296ba9619 to your computer and use it in GitHub Desktop.
Interactive simple demo from flutter-go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
final TransformationController _transformationController = TransformationController(); | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'Demo', | |
home: Scaffold( | |
appBar: AppBar(title: Text('Demo')), | |
body: Stack( | |
children: <Widget>[ | |
Center( | |
child: InteractiveViewer( | |
transformationController: _transformationController, | |
child: Stack( | |
children: <Widget>[ | |
Padding( | |
padding: const EdgeInsets.all(8.0), | |
child: Container( | |
color: Colors.brown, | |
child: Image.network( | |
'https://1001freedownloads.s3.amazonaws.com/vector/thumb/116435/go_board_09x09.png', | |
), | |
), | |
), | |
], | |
), | |
), | |
), | |
], | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment