i am trying to create a single page app where I want to add and multiply some values, values are given below;
(currentTime.Day + currentTime.Month + 39) * currentTime.Year
and i want the value shown below and also get copied
this is the formula
i am trying to create a single page app where I want to add and multiply some values, values are given below;
(currentTime.Day + currentTime.Month + 39) * currentTime.Year
and i want the value shown below and also get copied
this is the formula
2
Answers
As far as i understood you want this fuzzy expression to be implemented, you can refer the below code:
For adding this data to your device clipboard you need a button, on it’s click it will add the value to the clipboard:
import this
import 'package:flutter/services.dart';
And then Simply implement this into your onPressed of the button:
Replace this below code with your main file code:
You can implement the formula using dart’s date time class methods.
Use the below code to get for the formula.
Reading the above comments you also want to copy the result of the expression.
You can use the SelectableText widget to solve that problem or you can use the above mentioned Clipboard service by importing the flutter/services.dart
You can view the working example of my code on dartpad here
To copy the value you just have to long press on the text and it will give you the option to copy the text.