-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move packages into a packages folder
- Loading branch information
1 parent
7dd7491
commit 95eff4c
Showing
197 changed files
with
687 additions
and
275 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import 'package:flutter/widgets.dart' show Text, Widget; | ||
import 'package:oui/src/core/text.dart'; | ||
|
||
import '../core/_index.dart'; | ||
|
||
class Label extends Component<Label> | ||
with | ||
ModifiableMaxLines<Label>, | ||
ModifiableTextAlign<Label>, | ||
ModifiableSoftWrap<Label>, | ||
ModifiableTextOverflow<Label>, | ||
ModifiableTextScaler<Label>, | ||
ModifiableTextWidthMode<Label>, | ||
ModifiableTextHeightBehavior<Label>, | ||
ModifiableSemanticsLabel<Label> { | ||
final String text; | ||
|
||
const Label( | ||
this.text, { | ||
super.key, | ||
super.modifiers, | ||
}); | ||
|
||
@override | ||
Label copyWith({ComponentModifiers? modifiers}) { | ||
return Label( | ||
text, | ||
key: key, | ||
modifiers: modifiers ?? this.modifiers, | ||
); | ||
} | ||
|
||
@override | ||
Widget buildWithModifiers( | ||
ComponentContext context, [ | ||
Widget? child, | ||
]) { | ||
Text label = Text(text); | ||
|
||
for (final modifier in modifiers) { | ||
if (modifier is LabelModifier) { | ||
label = modifier.modify(label, context); | ||
} | ||
} | ||
|
||
return label; | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.