Skip to content

Commit

Permalink
Refactor tester
Browse files Browse the repository at this point in the history
  • Loading branch information
sunarya-thito committed Oct 25, 2024
1 parent ad36500 commit 20c87d4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions test/data_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ main() {
});
}

class ShadcnTester extends StatelessWidget {
class Tester extends StatelessWidget {
final Widget child;

const ShadcnTester({super.key, required this.child});
const Tester({super.key, required this.child});

@override
Widget build(BuildContext context) {
Expand Down Expand Up @@ -110,7 +110,7 @@ class RootWidgetState extends State<RootWidget> {

@override
Widget build(BuildContext context) {
return ShadcnTester(
return Tester(
child: Data.inherit(
data: _counter,
child: Data.inherit(
Expand Down
12 changes: 6 additions & 6 deletions test/model_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ class _RootModelWidgetState extends State<RootModelWidget> {
bool flag = false;
@override
Widget build(BuildContext context) {
return ShadcnTester(
return Tester(
child: MultiModel(
data: [
Model(
Expand Down Expand Up @@ -247,7 +247,7 @@ class _RootModelSeparatedWidgetState extends State<RootModelSeparatedWidget> {
bool flag = false;
@override
Widget build(BuildContext context) {
return ShadcnTester(
return Tester(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Expand Down Expand Up @@ -306,7 +306,7 @@ class _RootModelNotifierWidgetState extends State<RootModelNotifierWidget> {
final flag = ValueNotifier<bool>(false);
@override
Widget build(BuildContext context) {
return ShadcnTester(
return Tester(
child: MultiModel(
data: [
ModelNotifier<int>(#counter, counter),
Expand Down Expand Up @@ -350,7 +350,7 @@ class _RootModelNotifierSeparatedWidgetState
final flag = ValueNotifier<bool>(false);
@override
Widget build(BuildContext context) {
return ShadcnTester(
return Tester(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Expand Down Expand Up @@ -395,7 +395,7 @@ class _RootModelReadOnlyWidgetState extends State<RootModelReadOnlyWidget> {
bool flag = false;
@override
Widget build(BuildContext context) {
return ShadcnTester(
return Tester(
child: MultiModel(
data: [
Model(
Expand Down Expand Up @@ -449,7 +449,7 @@ class _RootModelReadOnlySeparatedWidgetState
bool flag = false;
@override
Widget build(BuildContext context) {
return ShadcnTester(
return Tester(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Expand Down
2 changes: 1 addition & 1 deletion test/multi_data_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class MultiDataRootWidgetState extends State<MultiDataRootWidget> {

@override
Widget build(BuildContext context) {
return ShadcnTester(
return Tester(
child: MultiData(
data: [
Data(_counter),
Expand Down

0 comments on commit 20c87d4

Please sign in to comment.