adding packages
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
# floating_search_bar_example
|
||||
|
||||
Demonstrates how to use the floating_search_bar plugin.
|
||||
|
||||
``` dart
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:floating_search_bar/floating_search_bar.dart';
|
||||
|
||||
void main() => runApp(MyApp());
|
||||
|
||||
class MyApp extends StatefulWidget {
|
||||
@override
|
||||
_MyAppState createState() => _MyAppState();
|
||||
}
|
||||
|
||||
class _MyAppState extends State<MyApp> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
home: FloatingSearchBar.builder(
|
||||
itemCount: 100,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return ListTile(
|
||||
leading: Text(index.toString()),
|
||||
);
|
||||
},
|
||||
trailing: CircleAvatar(
|
||||
child: Text("RD"),
|
||||
),
|
||||
drawer: Drawer(
|
||||
child: Container(),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user