pub.dev score: license, dartdoc, analysis, tests

- Add MIT license
- Add dartdoc to all public APIs (UxKeyboard, BendBox, Bezier, Json)
- Add analysis_options.yaml with flutter_lints and public_member_api_docs
- Add repository, issue_tracker, topics to pubspec.yaml
- Expand package description
- Fix BendBox constructor (const, super.key)
- Remove unused import in keyboard.dart
- Replace boilerplate tests with UxKeyboard smoke tests
- Move ux dependency to example's dependencies (not dev_dependencies)
This commit is contained in:
agra
2026-04-16 18:50:33 +03:00
parent 0fff294caf
commit 785c6d3c31
15 changed files with 234 additions and 125 deletions

View File

@@ -1,21 +1,16 @@
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:ux/ux.dart';
void main() {
const MethodChannel channel = MethodChannel('ux');
setUp(() {
channel.setMockMethodCallHandler((MethodCall methodCall) async {
return '42';
});
test('UxKeyboard.instance is a singleton', () {
expect(UxKeyboard.instance, same(UxKeyboard.instance));
});
tearDown(() {
channel.setMockMethodCallHandler(null);
test('UxKeyboard.height starts at 0', () {
expect(UxKeyboard.instance.height, 0);
});
test('getPlatformVersion', () async {
expect(await UX.platformVersion, '42');
test('UxKeyboard.isOpen is false when height is 0', () {
expect(UxKeyboard.instance.isOpen, false);
});
}