-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue192 paired symbols, issue199 yaml support #231
base: main
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## main #231 +/- ##
==========================================
- Coverage 81.96% 81.89% -0.07%
==========================================
Files 107 108 +1
Lines 3166 3187 +21
==========================================
+ Hits 2595 2610 +15
- Misses 571 577 +6
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need two tests:
- A unit test to
InsertionCodeModifer
with1
and23
strings. - A test on
CodeController
that if created with the default parameters it handles all 6 pairs of characters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -23,6 +23,10 @@ class PopupController extends ChangeNotifier { | |||
|
|||
int get selectedIndex => _selectedIndex; | |||
|
|||
void reset() { | |||
itemScrollController = ItemScrollController(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the desired effect of this? Scroll to the top? If so, can you manually scroll to the top?
Replacing the controller has the drawbacks:
- Need to dispose the old one.
- Need to make sure the disposed one will not show in a widget and break it.
import 'package:flutter_test/flutter_test.dart'; | ||
|
||
void main() { | ||
test('inserts at the start of string correctly', () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
group('InsertionCodeModifier', ...
|
||
void main() { | ||
test('inserts at the start of string correctly', () { | ||
const modifier = InsertionCodeModifier(openChar: '1', closeString: '23'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make global?
const modifier = InsertionCodeModifier(openChar: '1', closeString: '23'); | ||
const text = 'Hello World'; | ||
final selection = TextSelection.fromPosition(const TextPosition(offset: 0)); | ||
const editorParams = EditorParams(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make global?
resolves #192
resolves #199
resolves #235