forked from javiercbk/json_to_dart
/
index.html
112 lines (101 loc) · 5.11 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>JSON to Dart</title>
<link rel="stylesheet" href="styles/github.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css"
integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
<link rel="stylesheet" href="font_awesome/css/font-awesome.min.css">
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"
integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"
integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI"
crossorigin="anonymous"></script>
</head>
<body>
<!-- Navbar Start -->
<nav class="navbar navbar-expand-sm navbar-dark bg-dark p-0">
<div class="container-fluid">
<a href="index.html" class="navbar-brand">JSON to Dart</a>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a href="https://github.com/zeeshanhussain/json_to_dart" class="nav-link">
<i class="fa fa-github"></i> GitHub
</a>
</li>
</ul>
</div>
</div>
</nav>
<!-- Navbar End -->
<div class="container-fluid min-vh-95">
<div class="row">
<!-- Edit area begin -->
<div class="col-md-4"
style="padding-left: 1%;background-color: #99aab5;color: black;padding-bottom: 1%;min-height: 95vh;">
<form onsubmit="return false;">
<div class="form-group" style="text-align: center;">
<label for="jsonEditor" class="p-2" style="margin: 0%;">Paste your JSON below</label>
<div id="jsonEditor"></div>
</div>
<input class="form-control mb-2" id="dartClassName"
placeholder="Your dart class name goes here">
<button type="submit" class="btn mb-2 btn-block btn-primary">Generate Dart</button>
<button id="copy-clipboard" class="btn mb-2 btn-block btn-secondary" disabled>Copy Dart code to
clipboard</button>
</form>
</div>
<!-- Edit area -->
<div class="col-md-6" style="background-color: #DCDCDC;">
<b id="invalid-dart" style="display: none">The Dart code generated is invalid</b>
<pre><code class="dart" style="
padding-top: 3%;
max-height: 92vh;
"></code></pre>
<textarea style="position:fixed;opacity: 0;" id="hidden-dart"></textarea>
</div>
<div class="col-md-2 d-flex align-items-start flex-column" style="background-color: #dbe9f1d8;">
<br>
<label><input type="checkbox" id="private-fields"> Use private fields</label>
<label><input type="checkbox" id="new-keyword"> Use New keyword</label>
<label><input type="checkbox" id="this-keyword"> Use this keyword</label>
<label><input type="checkbox" id="collection-literals" checked> Use Collection literals</label>
<label><input type="checkbox" id="required"> Make all properties Required</label>
<label><input type="checkbox" id="final"> Make all properties Final</label>
<label><input type="checkbox" id="types"> Types only</label>
<br>
<br>
<br>
<div>
<div class="col lead text-center">
<b>
<a href="https://dart-lang.github.io/linter/lints/">Pedantic Rules</a>
</b>
</div>
<br>
<div class="col lead text-center">
<b>
<a href="https://github.com/javiercbk">Credits: Javier Lecuona</a>
</b>
</div>
</div>
</div>
</div>
</div>
<!-- Footer end -->
<script src="js/highlight.min.js"></script>
<script src="js/ace.js" type="text/javascript" charset="utf-8"></script>
<script src="js/ace-mode-json.js" type="text/javascript" charset="utf-8"></script>
<script src="js/ace-theme-github.js" type="text/javascript" charset="utf-8"></script>
<script src="js/page.js"></script>
</body>
</html>