Done
This commit is contained in:
parent
4d2ca8a28a
commit
3f84e6d814
4 changed files with 21 additions and 1 deletions
7
.idea/runConfigurations/All_Tests.xml
Normal file
7
.idea/runConfigurations/All_Tests.xml
Normal file
|
@ -0,0 +1,7 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="All Tests" type="DartCommandLineRunConfigurationType" factoryName="Dart Command Line Application" singleton="true">
|
||||
<option name="checkedMode" value="false" />
|
||||
<option name="filePath" value="$PROJECT_DIR$/test/all_test.dart" />
|
||||
<method />
|
||||
</configuration>
|
||||
</component>
|
|
@ -1,6 +1,7 @@
|
|||
# paginate
|
||||
[](https://pub.dartlang.org/packages/angel_paginate)
|
||||
[](https://travis-ci.org/angel-dart/paginate)
|
||||

|
||||
|
||||
Platform-agnostic pagination library, with custom support for the
|
||||
[Angel framework](https://github.com/angel-dart/angel).
|
||||
|
@ -48,7 +49,7 @@ main() {
|
|||
print(page.startIndex);
|
||||
print(page.data); // The actual items on this page.
|
||||
p.next(); // Advance a page
|
||||
p.goBack(); // Back one page
|
||||
p.back(); // Back one page
|
||||
p.goToPage(10); // Go to page number (1-based, not a 0-based index)
|
||||
}
|
||||
```
|
||||
|
|
7
test/all_test.dart
Normal file
7
test/all_test.dart
Normal file
|
@ -0,0 +1,7 @@
|
|||
import 'paginate_test.dart' as paginate_test;
|
||||
import 'server_test.dart' as server;
|
||||
|
||||
main() {
|
||||
paginate_test.main();
|
||||
server.main();
|
||||
}
|
|
@ -43,6 +43,11 @@ main() {
|
|||
expect(paginator.canGoBack, false);
|
||||
expect(paginator.canGoForward, true);
|
||||
expect(paginator.lastPageNumber, 21);
|
||||
|
||||
// Going back should do nothing
|
||||
var p = paginator.pageNumber;
|
||||
paginator.back();
|
||||
expect(paginator.pageNumber, p);
|
||||
});
|
||||
|
||||
group('paginate', () {
|
||||
|
|
Loading…
Reference in a new issue