Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
fluttet_clipboard
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李增强
fluttet_clipboard
Commits
5b180631
Commit
5b180631
authored
Mar 23, 2021
by
李增强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial commit
parent
c1f197c9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
44 deletions
+6
-44
.idea/vcs.xml
.idea/vcs.xml
+6
-0
example/lib/main.dart
example/lib/main.dart
+0
-21
test/fluttet_clipboard_test.dart
test/fluttet_clipboard_test.dart
+0
-23
No files found.
.idea/vcs.xml
0 → 100644
View file @
5b180631
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"VcsDirectoryMappings"
>
<mapping
directory=
"$PROJECT_DIR$"
vcs=
"Git"
/>
</component>
</project>
\ No newline at end of file
example/lib/main.dart
View file @
5b180631
...
...
@@ -19,27 +19,6 @@ class _MyAppState extends State<MyApp> {
@override
void
initState
()
{
super
.
initState
();
initPlatformState
();
}
// Platform messages are asynchronous, so we initialize in an async method.
Future
<
void
>
initPlatformState
()
async
{
String
platformVersion
;
// Platform messages may fail, so we use a try/catch PlatformException.
try
{
platformVersion
=
await
FluttetClipboard
.
platformVersion
;
}
on
PlatformException
{
platformVersion
=
'Failed to get platform version.'
;
}
// If the widget was removed from the tree while the asynchronous platform
// message was in flight, we want to discard the reply rather than calling
// setState to update our non-existent appearance.
if
(!
mounted
)
return
;
setState
(()
{
_platformVersion
=
platformVersion
;
});
}
@override
...
...
test/fluttet_clipboard_test.dart
deleted
100644 → 0
View file @
c1f197c9
import
'package:flutter/services.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:fluttet_clipboard/fluttet_clipboard.dart'
;
void
main
(
)
{
const
MethodChannel
channel
=
MethodChannel
(
'fluttet_clipboard'
);
TestWidgetsFlutterBinding
.
ensureInitialized
();
setUp
(()
{
channel
.
setMockMethodCallHandler
((
MethodCall
methodCall
)
async
{
return
'42'
;
});
});
tearDown
(()
{
channel
.
setMockMethodCallHandler
(
null
);
});
test
(
'getPlatformVersion'
,
()
async
{
expect
(
await
FluttetClipboard
.
platformVersion
,
'42'
);
});
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment