EDIT: Let me clarify more the point I am struggling to achieve as it seems not to be clear. I already built a table with TextFields as you see in my code, and I tried the excel package and I tried several other packages, however nothing allows me to COPY the input from an external spreadsheet to my web app directly. The user will eventually have to manually type all the digital sample values one by one or they have to upload an external excel sheet to the site. These samples can be as big as several thousand samples in some cases, the only option is to copy them from their original spreadsheet or text source to the web app.
In my flutter web app, I want to get input from the users: they input time samples of any digital signal into a series of TextFields then the site will plot these samples and do some processing on them etc..
The problem is that digital signals are usually long and users will want to copy them from other text files or spreadsheets rather than manually typing them one by one in the browser.
Below is part of the code I used so far
class InputData extends StatefulWidget {
@override
State<InputData> createState() => _InputDataState();
}
class _InputDataState extends State<InputData> {
@override
Widget build(BuildContext context) {
return Material(
child:Scaffold(
body: Column(
children: <Widget>[
TitleBanner(),
Expanded(
child: Row(
children: [
Container(
height: 40,
width: 100,
child: Text('Sample Interval')),
Container(
height: 40,
width: 100,
child: TextField())
],
),
),
SizedBox(height: 100,),
Expanded(
child: Padding(
padding: const EdgeInsets.fromLTRB(8.0,0,0,0),
child: Row(
children: <Widget>[
Column(
children: <Widget>[
Container(
decoration: BoxDecoration(border: Border.all() ),
height: 20,
width: 100,
child: Text('Samples')),
buildTextField(),
buildTextField(),
buildTextField(),
buildTextField(),
buildTextField(),
buildTextField(),
buildTextField(),
]
),
Column(
children: <Widget>[
Container(
decoration: BoxDecoration(border: Border.all() ),
height: 20,
width: 100,
child: Text('Amplitudes')),
buildTextField(),
buildTextField(),
buildTextField(),
buildTextField(),
buildTextField(),
buildTextField(),
buildTextField(),
]
)
],
),
),
)
],
),
)
);
}
Container buildTextField() {
return Container(
decoration: BoxDecoration(border: Border.all() ),
height: 20,
width: 100,
child: TextField(keyboardType: TextInputType.number,
decoration: kTextFieldDecoration
),);
}
}
This way the user can input the samples and amplitudes manually but they cannot copy them from another source. I tried using the excel package in flutter, but it seems to allow us to use a full excel spreadsheet and export it rather than integrating the cells inside the browser.
I tried also some other packages like sticky_headers but they seem to do good formatting only, without allowing a copy from external spreadsheet.
Is there a way to directly paste the values using this implementation?