Git Product home page Git Product logo

dart_pad_widget's Introduction

Hi ๐Ÿ‘‹, You've reached Tim Whiting's GitHub Profile

About Me

  • ๐Ÿ”ญ Iโ€™m currently working on: My PhD Research, along with a few fun side projects
  • ๐ŸŒฑ Iโ€™m currently learning: Languages, Control Flow Analysis
  • ๐Ÿ’ฌ Ask me about: Koka, Control Flow Analysis, Dart, Flutter
  • ๐Ÿ“ซ How to reach me: Add an issue on one of my repositories, ideally one of the ones that you are interested in collaborating or knowing more about.

Personal Website

.... TODO: .....

dart_pad_widget's People

Contributors

caseycrogers avatar timwhiting avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dart_pad_widget's Issues

Blurry text on chrome

Hi, thanks for the plugin !

I wanted to let you know that on chrome, the text in the DartPad widget gets blurry depending on the size of the window (not the size of the widget, the actual size of the window, which might displace the widget from 1/2 pixel maybe?)

Anyway, here is an example:
Blurry:
image

NOT blurry:
image

I can't tell what change in the window size lead to this issue, in works with any window size by just changing the size of a few pixels.

Also note that I cannot reproduce this behavior in Firefox, only in chrome.

Also I did display rich bellow the DartPad widget and it does not get blurry.

updating text in dart pad not working.

at this time i'm working a project and i'm tryping to update the "code" from dart pad widget using setState method but it won't update i dont know what's the issue here so this is my code below:

import 'package:flutter/material.dart';
import 'package:dart_pad_widget/dart_pad_widget.dart';
import 'package:flutter/foundation.dart';

class HomePage extends StatefulWidget {
  @override
  _HomePageState createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  final keyValue = Key('codeOne');

  TextEditingController promptController = new TextEditingController();
  TextEditingController tokenController = new TextEditingController();

  String response;
  int token = 50;

  @override
  void initState() {
    super.initState();
    promptController = TextEditingController();
    tokenController = TextEditingController();
  }

  @override
  void dispose() {
    super.dispose();
    promptController.dispose();
    tokenController.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: SingleChildScrollView(
        child: Row(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Column(
              crossAxisAlignment: CrossAxisAlignment.center,
              children: [
                Container(
                  margin: EdgeInsets.only(top: 30),
                  width: 600,
                  child: TextField(
                    controller: promptController,
                    keyboardType: TextInputType.multiline,
                    maxLines: null,
                    decoration: InputDecoration(
                      hintText: 'Enter your request.',
                      border: OutlineInputBorder(),
                    ),
                  ),
                ),
                Container(
                  margin: EdgeInsets.only(top: 10, bottom: 10),
                  width: 600,
                  child: TextField(
                    controller: tokenController,
                    decoration: InputDecoration(
                      hintText: 'Enter max tokens (default is 50)',
                      border: OutlineInputBorder(),
                    ),
                    onChanged: (tokenValue) {
                      token = int.parse(tokenValue);
                    },
                  ),
                ),
                Container(
                  width: 600,
                  child: FlatButton(
                    key: keyValue,
                    child: Text('DONE'),
                    textColor: Colors.white,
                    color: Colors.blue,
                    onPressed: () {
                      setState(() {
                        response = 'Hello'; //
                      });
                    },
                  ),
                ),
                SizedBox(height: 20),
                DartPad(
                  //dart output not showing after set state.
                  key: keyValue,
                  flutter: true,
                  width: 1024,
                  height: 600,
                  code: response,
                ),
                SizedBox(height: 15),
              ],
            ),
          ],
        ),
      ),
    );
  }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.