calculator_flutter 0.0.2
calculator_flutter: ^0.0.2 copied to clipboard
A Package to simplify your calculations.
Add Two Numbers #
A simple Flutter package to Calculate numbers.
You can perform in following ways.
AddTwoNumbers.add(double a, double b);
SubTwoNumbers.sub(double a, double b);
MultiplyTwoNumbers.multiply(double a, double b);
DivideTwoNumbers.divide(double a, double b);
## Installation
Add this to your `pubspec.yaml`:
```yaml
dependencies:
calculator_flutter: ^1.0.0
### Explanation:
- **Installation** section explains how to add the package to your project.
- **Example Usage** section shows a sample Dart code that demonstrates how to call the functions in your package.
This format ensures clarity and helps users quickly understand how to integrate and use the package in their Flutter projects.
import 'package:calculator_flutter/calculator_flutter.dart';
void main() {
double resultAddition = AddTwoNumbers.add(5.0, 3.0);
double resultSubtraction = SubTwoNumbers.sub(5.0, 3.0);
double resultMultiplication = MultiplyTwoNumbers.multiply(5.0, 3.0);
double resultDivision = DivideTwoNumbers.divide(5.0, 3.0);
print('Addition: $resultAddition'); // 8.0
print('Subtraction: $resultSubtraction'); // 2.0
print('Multiplication: $resultMultiplication'); // 15.0
print('Division: $resultDivision'); // 1.6667
}