Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
chenenyu committed Nov 18, 2020
1 parent 94a619c commit c12def8
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,11 @@ dependencies:
## Usage:
Import first:
`import 'package:flutter_fps/flutter_fps.dart';`

Then in your top level `StatefulWidget`, add the following line:

```dart
@override
void initState() {
super.initState();
Fps.instance.start(context);
}
import 'package:flutter_fps/flutter_fps.dart';

Fps.instance.start();
Fps.instance.addFpsCallback((fpsInfo) {
print(fpsInfo);
});
```

0 comments on commit c12def8

Please sign in to comment.