Questions tagged [dartpad]
9 questions
5
votes
2 answers
How to STOP a program in DartPad?
Using DartPad, how do you stop the current program without losing all your code?
As it is, it seems there is only:
a RUN button
a RESET button (which wipes your code)
The answer is not:
"just leave it running and click RUN again,"
(because…

Nerdy Bunz
- 6,040
- 10
- 41
- 100
1
vote
1 answer
Can I change the Dart/Flutter SDK versions on Dartpad.dev?
Context
I am currently working on a project that requires the use of Dartpad.dev, and I'm looking to modify the Flutter/Dart SDK version for my specific needs.
In a typical environment, altering the SDK version can be achieved by updating the…

MendelG
- 14,885
- 4
- 25
- 52
0
votes
2 answers
i want add a scrollbar to my chatbot when text is bigger user can scroll content
When there is more text in my response i cant read it becasue of height chat window. So i want add there a scrollbar .
Flexible(
child: Container(
padding: EdgeInsets.all(8.0),
decoration:…

Peter Dadaj
- 11
- 1
0
votes
0 answers
Hi i have simple code in flutter where i want return in sentence formatted bold or colored word.My text is return without formatting it looks bad
Here is my code where return response is that text which i want to be formatting. At start program i choose option after what i choose it will display this answer.
String getResponse(String selectedOption) { // Pass the selected option as a…

Peter Dadaj
- 11
- 1
0
votes
0 answers
The "Is" type-testing operator behaving unexpectedly in DartPad
It was my understanding that is type testing operator in Dart should return "True if the object has a certain type."
So why is this happening in DartPad??
void main() {
// as
// is
// is!
double d = 3.0;
bool result = d is int;
…

Nerdy Bunz
- 6,040
- 10
- 41
- 100
0
votes
1 answer
How to define a Stack in dartPad?
https://dartpad.dev/?
import 'package:starter/stack.dart';
void main() {
print (calculation("(2+2*6"));
}
calculation(expression){
var tokens = expression.split(" ");
Stack values = Stack();
Stack ops = Stack();
}
note that if I remove…

Ayz
- 181
- 1
- 9
0
votes
1 answer
A dart code behaves differently in dartpad and local because of double type
//Works on Dartpad
main() {
var pi = 3.14; //3.14159265359
var numbers = 0;
dynamic result = 1.2;
while (result.runtimeType == double) {
numbers++;
result = numbers * pi;
}
print('$result / $numbers = $pi');
}
//Works on…

Doca
- 37
- 6
0
votes
1 answer
How to import a package into DartPad?
I'm doing Codelabs Write your first Flutter app. Step 4 is about using external packages. Is it possible to import external packages into DartPad? I see tabs in the lower left for "Console" and "Documentation" but there's nothing in these panes. Is…

Thomas David Kehoe
- 10,040
- 14
- 61
- 100