Skip to content

Commit

Permalink
[update] README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefano-Trinca committed Apr 4, 2024
1 parent 22f70ae commit 7c0ba8a
Showing 1 changed file with 64 additions and 25 deletions.
89 changes: 64 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,78 @@
<!--
This README describes the package. If you publish this package to pub.dev,
this README's contents appear on the landing page for your package.

For information about how to write a good package README, see the guide for
[writing package pages](https://dart.dev/guides/libraries/writing-package-pages).
# APIX

For general information about developing packages, see the Dart guide for
[creating packages](https://dart.dev/guides/libraries/create-library-packages)
and the Flutter guide for
[developing packages and plugins](https://flutter.dev/developing-packages).
-->
APIX is a Flutter package designed to facilitate and accelerate Dart code writing by introducing various useful extensions.

TODO: Put a short description of the package here that helps potential users
know whether this package might be useful for them.
## Getting Started

## Features
To use the `apix` package, add it to your project's Flutter dependencies by modifying the `pubspec.yaml` file:

TODO: List what your package can do. Maybe include images, gifs, or videos.
```yaml
dependencies:
apix: ^latest_version
```
After adding the package, you can import it into your Dart project:
```dart
import 'package:apix/apix.dart';
```

## Usage Examples

Here are some examples of how the extensions provided by `apix` can be used to improve and simplify your code:

### Using Numeric Extensions

```dart
int x = 10;
int y = x.plus(5); // 15
```

### Extensions on BuildContext

Using extensions on `BuildContext` can provide quick access to theme-specific data and metrics, enhancing the way your app responds to different screen sizes and themes.

#### Accessing Device Width

```dart
double deviceWidth = context.sizes.width; // Gets the device width
```

#### Checking for Dark Mode

```dart
bool isDarkModeEnabled = context.isDarkMode; // Returns true if dark mode is enabled
```

## Getting started
### String Extensions

TODO: List prerequisites and provide or point to information on how to
start using the package.
Capitalize the first letter of a string, or every word in a string, to enhance readability or conform to stylistic guidelines.

## Usage
#### Capitalize First Letter

TODO: Include short and useful examples for package users. Add longer examples
to `/example` folder.
Assuming an extension `capitalizeFirst` exists:

```dart
const like = 'sample';
String greeting = 'hello world'.capitalizeFirst(); // 'Hello world'
```

## Additional information
#### Capitalize Each Word

And for `capitalize`, assuming it capitalizes the first letter of each word:

```dart
String title = 'hello world'.capitalize(); // 'Hello World'
```

## Documentation

For more information on the extensions provided and how to use them, visit the [official documentation](https://api.flutter.dev/).

## Contributing

If you wish to contribute to the `apix` package, you are welcome! Check out the [open issues](https://github.com/Stefano-Trinca/apix/issues) or submit a pull request.

## License

TODO: Tell users more about the package: where to find more information, how to
contribute to the package, how to file issues, what response they can expect
from the package authors, and more.
This package is released under the Apache License 2.0. See the LICENSE file for more details.

0 comments on commit 7c0ba8a

Please sign in to comment.