Skip to content

Instantly share code, notes, and snippets.

@iskakaushik
Created April 4, 2019 20:50
Show Gist options
  • Save iskakaushik/8cf258405fec07af8e55c52382d1fc37 to your computer and use it in GitHub Desktop.
Save iskakaushik/8cf258405fec07af8e55c52382d1fc37 to your computer and use it in GitHub Desktop.
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:webview_flutter/webview_flutter.dart';
void main() => runApp(MaterialApp(home: CrashingWebViewExample()));
class CrashingWebViewExample extends StatelessWidget {
@override
Widget build(BuildContext context) {
final double maxHeight = MediaQuery.of(context).size.height;
return ListView.builder(
itemExtent: 180,
itemBuilder: (BuildContext context, int index) {
return Container(
height: maxHeight * 0.8,
child: WebView(
initialUrl: 'https://en.wikipedia.org/wiki/Cephalopod_size',
),
);
},
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment