Skip to content
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

Basic Structure #12

Merged
merged 2 commits into from May 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 2 additions & 7 deletions package/lib/comprehension_measurement.dart
@@ -1,7 +1,2 @@
library comprehension_measurement;

/// A Calculator.
class Calculator {
/// Returns [value] plus 1.
int addOne(int value) => value + 1;
}
export 'src/main.dart' show measureComprehension;
export 'src/types/single_choice.dart' show SingleChoiceWidget;
20 changes: 20 additions & 0 deletions package/lib/src/main.dart
@@ -0,0 +1,20 @@
import 'package:flutter/material.dart';

void measureComprehension(BuildContext context) {
showBottomSheet(
context: context,
backgroundColor: Colors.transparent,
builder: (BuildContext context) {
return Container(
margin: const EdgeInsets.all(8),
width: double.infinity,
child: Card(
elevation: 4,
shape:
RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
child: const Text("Text"),
),
);
},
);
}
15 changes: 15 additions & 0 deletions package/lib/src/types/single_choice.dart
@@ -0,0 +1,15 @@
import 'package:flutter/material.dart';

class SingleChoiceWidget extends StatefulWidget {
const SingleChoiceWidget({Key? key}) : super(key: key);

@override
State<SingleChoiceWidget> createState() => _SingleChoiceWidgetState();
}

class _SingleChoiceWidgetState extends State<SingleChoiceWidget> {
@override
Widget build(BuildContext context) {
return Container();
}
}
7 changes: 1 addition & 6 deletions package/test/comprehension_measurement_test.dart
Expand Up @@ -3,10 +3,5 @@ import 'package:flutter_test/flutter_test.dart';
import 'package:comprehension_measurement/comprehension_measurement.dart';

void main() {
test('adds one to input values', () {
final calculator = Calculator();
expect(calculator.addOne(2), 3);
expect(calculator.addOne(-7), -6);
expect(calculator.addOne(0), 1);
});
// TODO: Add tests
}