Skip to content

Instantly share code, notes, and snippets.

@AyushBherwani1998
Created June 30, 2020 10:44
Show Gist options
  • Select an option

  • Save AyushBherwani1998/3dbce6f7d425e2e9482a55816f49eadc to your computer and use it in GitHub Desktop.

Select an option

Save AyushBherwani1998/3dbce6f7d425e2e9482a55816f49eadc to your computer and use it in GitHub Desktop.
import 'package:flutter/material.dart';
void main() => runApp(MaterialApp(
routes: {
'/': (context) => MyApp(),
'/nextPage': (context) => NextPage(),
},
));
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('MyApp'),
),
body: ListView.builder(
itemBuilder: (context, index) => ListTile(
title: Text('Item $index'),
onTap: () => Navigator.pushNamed(context, '/nextPage'),
),
),
);
}
}
class NextPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Next Page Title'),
),
body: Center(
child: Text("Next Page"),
),
);
}
}
// ISSUE: #51682
// The issue describes that on scrolling the ListView quickly, and suddenly tapping the item to navigate throws error sometimes.
// I tried multiple times, but didn't throw me any errors.
@TahaTesser
Copy link

The issue describes that on scrolling the ListView quickly, and suddenly tapping the item to navigate throws error sometimes I tried multiple times, but didn't throw me any errors.

@TahaTesser
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment