Skip to content

Commit e3200f7

Browse files
committed
[REFAC] Readme and analysis options with fixing lint problems
1 parent 4f1fa2b commit e3200f7

24 files changed

+187
-293
lines changed

README.md

Lines changed: 98 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -1,120 +1,120 @@
11
# flutter_text_decorator
2+
![Flutter Text Decorator Logo][logo_white]
3+
![Flutter Text Decorator Logo][logo_black]
24

3-
![License](https://img.shields.io/github/license/EXXETA/flutter_tex_dec)
4-
<!-- ![Release](https://img.shields.io/github/release/EXXETA/flutter_tex_dec) -->
5-
<!-- [![pub package](https://img.shields.io/pub/v/flutter_tex_dec)](https://pub.dev/packages/flutter_tex_dec) -->
6-
7-
![Screenshot of Feature Grid](./documentation/img/overview.png)
5+
[![License: MIT][license_badge]][license_link]
6+
[![style: very good analysis][very_good_analysis_badge]][very_good_analysis_link]
87

98
Bring your words to life leveraging flutter_text_decorator with wavy underlines, colorful boxes, speech bubbles and more. Whether you want to highlight important details, add a playful touch or simply stand out. The package makes it easy to add personality and flair to your text.
109

10+
Developed with passion by [**EXXETA**](https://www.exxeta.com)
11+
1112
## Features
1213

13-
- [x] Boxes
14-
- [x] Underline
15-
- [x] Wavy Box
16-
- [x] Speech Bubble
14+
- Boxes
15+
- Underline
16+
- Wavy Box
17+
- Speech Bubble
1718

1819
Feel free to check out the [Example App](./example) and play around.
1920

20-
## Installation
21-
22-
### pub.dev
23-
24-
Add flutter_text_decorator as dependency to `pubspec.yaml`:
25-
26-
```
27-
dependencies:
28-
flutter_tex_dec: ^0.1.0
29-
```
30-
31-
## Usage
32-
33-
### Box Decorator
34-
35-
```
36-
TextDecorator.boxed(
37-
style: BoxStyle.rounded,
38-
text: const Text(
39-
'Rounded Box',
40-
style: TextStyle(fontSize: 32),
41-
),
42-
strokeWidth: 2,
43-
),
44-
```
45-
46-
![Box Decorator Example](./documentation/img/box.png)
47-
48-
### Circle Decorator
49-
50-
```
51-
TextDecorator.circled(
52-
style: CircleStyle.circled,
53-
text: const Text(
54-
'Circled Text',
55-
style: TextStyle(fontSize: 32),
56-
),
57-
),
58-
```
59-
60-
![Circle Decorator Example](./documentation/img/circle.png)
61-
62-
### Underline Decorator
21+
## Quick Start 🚀
22+
23+
1. **Add `flutter_text_decorator` to your `pubspec.yaml`**
24+
25+
```yaml
26+
dependencies:
27+
flutter_text_decorator:
28+
```
29+
30+
2. **Run the following terminal command to install the package:**
31+
```sh
32+
flutter pub get
33+
```
34+
35+
3. **Import the package into your Dart file**
36+
37+
```sh
38+
import 'package:flutter_text_decorator/flutter_text_decorator.dart';
39+
```
40+
41+
4. **Use TextDecorator**
42+
43+
Here is a simple example of how you can use `TextDecorator.boxed`:
44+
```dart
45+
import 'package:flutter/material.dart';
46+
import 'package:flutter_text_decorator/flutter_text_decorator.dart';
47+
48+
class MyDecoratedWidget extends StatelessWidget {
49+
const MyDecoratedWidget({super.key});
50+
51+
@override
52+
Widget build(BuildContext context) {
53+
return Center(
54+
child: TextDecorator.boxed(
55+
style: BoxStyle.rounded,
56+
text: const Text(
57+
'Hello Decorated World!',
58+
style: TextStyle(fontSize: 24, color: Colors.white),
59+
),
60+
color: Colors.blueAccent,
61+
strokeWidth: 2,
62+
),
63+
);
64+
}
65+
}
66+
```
67+
68+
69+
## Styles Preview
70+
71+
<table>
72+
<tr>
73+
<td align="center">
74+
<h3>Box Decorator</h3>
75+
<img src="./documentation/img/box.png" alt="Box Decorator Example" width="80%">
76+
</td>
77+
<td align="center">
78+
<h3>Circle Decorator</h3>
79+
<img src="./documentation/img/circle.png" alt="Circle Decorator Example" width="80%">
80+
</td>
81+
</tr>
82+
<tr>
83+
<td align="center">
84+
<h3>Underline Decorator</h3>
85+
<img src="./documentation/img/underline.png" alt="Underline Decorator Example" width="80%">
86+
</td>
87+
<td align="center">
88+
<h3>Highlight Decorator</h3>
89+
<img src="./documentation/img/highlight.png" alt="Highlight Decorator Example" width="80%">
90+
</td>
91+
</tr>
92+
</table>
93+
94+
95+
## Planned features 🎯
96+
97+
We're always thinking of new ways to make text decoration even more fun and versatile! Our next big idea is to introduce a **Comic effect** to bring a playful, graphic-novel style to your Flutter apps. Stay tuned for this and other enhancements.
6398

64-
```
65-
TextDecorator.underlined(
66-
style: UnderlineStyle.horizontal,
67-
text: const Text(
68-
'Underlined Text',
69-
style: TextStyle(fontSize: 24),
70-
),
71-
color: Colors.orange,
72-
strokeWidth: 2,
73-
),
74-
```
75-
76-
![Underline Decorator Example](./documentation/img/underline.png)
77-
78-
### Highlight Decorator
79-
80-
```
81-
TextDecorator.highlighted(
82-
style: HighlightStyle.marker,
83-
text: const Text(
84-
'Highlighted Text',
85-
style: TextStyle(fontSize: 32),
86-
),
87-
),
88-
```
89-
90-
![Underline Decorator Example](./documentation/img/highlight.png)
91-
92-
## Roadmap
93-
94-
### TODO's
95-
96-
- [ ] Fix Wavy Box corners
97-
- [ ] Add test automation
98-
99-
### Planned features
100-
101-
- [ ] Comic effect
10299

103100
## Contributing
101+
We love new ideas and contributions from the community! If you have a suggestion, a bug report, or want to contribute code, please check out our [CONTRIBUTING](./CONTRIBUTING.md) guide to get started. Your input helps make `flutter_text_decorator` even better!
104102

105-
See [CONTRIBUTING](./CONTRIBUTING.md)
106103

107-
## Authors and acknowledgment
104+
## Authors
108105

109106
Authors:
110107

111108
- [Tobias Rump](https://github.com/TobiasRump)
112109
- [Jonas Klock](https://github.com/jay-k98)
113110

114-
Special Thanks:
115-
116-
- Noah Bauer for the creative name of this package
117-
118111
## License
119-
120-
See [LICENSE](./LICENSE)
112+
This project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.
113+
114+
[logo_black]: ./assets/flutter_text_decorator_logo_dark.png#gh-light-mode-only
115+
[logo_white]: ./assets/flutter_text_decorator_logo_light.png#gh-dark-mode-only
116+
[license_link]: https://opensource.org/licenses/MIT
117+
[license_badge]: https://img.shields.io/badge/license-MIT-blue.svg
118+
[very_good_analysis_badge]: https://img.shields.io/badge/style-very_good_analysis-B22C89.svg
119+
[very_good_analysis_link]: https://pub.dev/packages/very_good_analysis
120+
[very_good_ventures_link]: https://verygood.ventures

analysis_options.yaml

Lines changed: 4 additions & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -1,114 +1,7 @@
1-
include: package:flutter_lints/flutter.yaml
1+
include: package:very_good_analysis/analysis_options.yaml
22

33
linter:
44
rules:
5-
# Error
6-
- always_use_package_imports
7-
- avoid_empty_else
8-
- avoid_slow_async_io
9-
- avoid_types_as_parameter_names
10-
- cancel_subscriptions
11-
- collection_methods_unrelated_type
12-
- control_flow_in_finally
13-
- deprecated_member_use_from_same_package
14-
- empty_statements
15-
- hash_and_equals
16-
- literal_only_boolean_expressions
17-
- no_duplicate_case_values
18-
- no_logic_in_create_state
19-
- no_self_assignments
20-
- no_wildcard_variable_uses
21-
- test_types_in_equals
22-
- unnecessary_statements
23-
- use_build_context_synchronously
24-
- use_key_in_widget_constructors
25-
- valid_regexps
26-
27-
# Style
28-
- always_put_required_named_parameters_first
29-
- annotate_overrides
30-
- annotate_redeclares
31-
- avoid_bool_literals_in_conditional_expressions
32-
- avoid_function_literals_in_foreach_calls
33-
- avoid_init_to_null
34-
- avoid_private_typedef_functions
35-
- avoid_positional_boolean_parameters
36-
- avoid_redundant_argument_values
37-
- avoid_return_types_on_setters
38-
- avoid_returning_null_for_void
39-
- avoid_returning_this
40-
- avoid_shadowing_type_parameters
41-
- avoid_unnecessary_containers
42-
- avoid_void_async
43-
- await_only_futures
44-
- camel_case_extensions
45-
- camel_case_types
46-
- cascade_invocations
47-
- cast_nullable_to_non_nullable
48-
- curly_braces_in_flow_control_structures
49-
- directives_ordering
50-
- do_not_use_environment
51-
- empty_catches
52-
- empty_constructor_bodies
53-
- exhaustive_cases
54-
- file_names
55-
- implementation_imports
56-
- implicit_call_tearoffs
57-
- leading_newlines_in_multiline_strings
58-
- matching_super_parameters
59-
- no_literal_bool_comparisons
60-
- null_closures
61-
- null_check_on_nullable_type_parameter
62-
- one_member_abstracts
63-
- prefer_adjacent_string_concatenation
64-
- prefer_conditional_assignment
65-
- prefer_const_constructors
66-
- prefer_contains
67-
- prefer_final_in_for_each
68-
- prefer_final_locals
69-
- prefer_for_elements_to_map_fromIterable
70-
- prefer_foreach
71-
- prefer_generic_function_type_aliases
72-
- prefer_if_elements_to_conditional_expressions
73-
- prefer_if_null_operators
74-
- prefer_initializing_formals
75-
- prefer_inlined_adds
76-
- prefer_interpolation_to_compose_strings
77-
- prefer_is_empty
78-
- prefer_is_not_empty
79-
- prefer_is_not_operator
80-
- prefer_iterable_whereType
81-
- prefer_null_aware_method_calls
82-
- prefer_null_aware_operators
83-
- prefer_typing_uninitialized_variables
84-
- recursive_getters
85-
- require_trailing_commas
86-
- sized_box_for_whitespace
87-
- sized_box_shrink_expand
88-
- sort_child_properties_last
89-
- sort_unnamed_constructors_first
90-
- unawaited_futures
91-
- unnecessary_await_in_return
92-
- unnecessary_brace_in_string_interps
93-
- unnecessary_breaks
94-
- unnecessary_const
95-
- unnecessary_constructor_name
96-
- unnecessary_getters_setters
97-
- unnecessary_lambdas
98-
- unnecessary_new
99-
- unnecessary_null_aware_assignments
100-
- unnecessary_null_in_if_null_operators
101-
- unnecessary_nullable_for_final_variable_declarations
102-
- unnecessary_overrides
103-
- unnecessary_string_escapes
104-
- unnecessary_string_interpolations
105-
- unnecessary_this
106-
- unnecessary_to_list_in_spreads
107-
- use_colored_box
108-
- use_decorated_box
109-
- use_full_hex_values_for_flutter_colors
110-
- use_rethrow_when_possible
111-
112-
# Docs
113-
- slash_for_doc_comments
114-
5+
lines_longer_than_80_chars: false
6+
public_member_api_docs: false
7+
29.5 KB
Loading
23.9 KB
Loading

example/android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ android {
3434
}
3535

3636
defaultConfig {
37-
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
37+
// TODO(everyone): Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
3838
applicationId = "com.example.example"
3939
// You can update the following values to match your application needs.
4040
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
@@ -46,7 +46,7 @@ android {
4646

4747
buildTypes {
4848
release {
49-
// TODO: Add your own signing config for the release build.
49+
// TODO(everyone): Add your own signing config for the release build.
5050
// Signing with the debug keys for now, so `flutter run --release` works.
5151
signingConfig = signingConfigs.debug
5252
}

lib/flutter_text_decorator.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
library flutter_text_decorator;
21

32
export 'src/modules/base/styles.dart';
43
export 'src/widgets/text_draw_decorator.dart';
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import 'package:flutter/material.dart';
2+
import 'package:flutter_text_decorator/src/modules/circle/decorations/circle_decoration.dart';
23

34
/// An abstract base class for defining common styling properties for text decorations.
45
///
@@ -7,11 +8,11 @@ import 'package:flutter/material.dart';
78
/// like [color] and [strokeWidth].
89
///
910
abstract class DecorationBase {
10-
final Color color;
11-
final double strokeWidth;
1211

1312
const DecorationBase({
1413
required this.color,
1514
required this.strokeWidth,
1615
});
16+
final Color color;
17+
final double strokeWidth;
1718
}

0 commit comments

Comments
 (0)