Commit a2bf54cb authored by Luca Braun's avatar Luca Braun

Updated Post Dialog

parent bc6d5697
2021/03/10-16:08:21.507 968 Reusing MANIFEST C:\Users\Luca\AppData\Local\Temp\flutter_tools.b6d5c3cf\flutter_tools_chrome_device.f8891a83\Default\AutofillStrikeDatabase/MANIFEST-000001 2021/03/11-12:55:19.376 2318 Reusing MANIFEST C:\Users\Luca\AppData\Local\Temp\flutter_tools.c3c0a979\flutter_tools_chrome_device.3916f3a2\Default\AutofillStrikeDatabase/MANIFEST-000001
2021/03/11-12:55:19.376 2318 Recovering log #3
2021/03/11-12:55:19.376 2318 Reusing old log C:\Users\Luca\AppData\Local\Temp\flutter_tools.c3c0a979\flutter_tools_chrome_device.3916f3a2\Default\AutofillStrikeDatabase/000003.log
2021/03/10-16:08:21.423 347c Reusing MANIFEST C:\Users\Luca\AppData\Local\Temp\flutter_tools.b6d5c3cf\flutter_tools_chrome_device.f8891a83\Default\BudgetDatabase/MANIFEST-000001 2021/03/11-12:55:19.367 2318 Reusing MANIFEST C:\Users\Luca\AppData\Local\Temp\flutter_tools.c3c0a979\flutter_tools_chrome_device.3916f3a2\Default\BudgetDatabase/MANIFEST-000001
2021/03/11-12:55:19.367 2318 Recovering log #3
2021/03/11-12:55:19.367 2318 Reusing old log C:\Users\Luca\AppData\Local\Temp\flutter_tools.c3c0a979\flutter_tools_chrome_device.3916f3a2\Default\BudgetDatabase/000003.log
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
}, },
{ {
"name": "circlegraph", "name": "circlegraph",
"rootUri": "file:///C:/Users/Luca/Documents/flutter/flutter_windows_1.22.5-stable/flutter/.pub-cache/hosted/pub.dartlang.org/circlegraph-0.0.5", "rootUri": "file:///C:/Users/Luca/Documents/flutter/flutter_windows_1.22.5-stable/flutter/.pub-cache/hosted/pub.dartlang.org/circlegraph-0.0.6",
"packageUri": "lib/", "packageUri": "lib/",
"languageVersion": "2.7" "languageVersion": "2.7"
}, },
...@@ -91,6 +91,12 @@ ...@@ -91,6 +91,12 @@
"packageUri": "lib/", "packageUri": "lib/",
"languageVersion": "2.12" "languageVersion": "2.12"
}, },
{
"name": "ffi",
"rootUri": "file:///C:/Users/Luca/Documents/flutter/flutter_windows_1.22.5-stable/flutter/.pub-cache/hosted/pub.dartlang.org/ffi-1.0.0",
"packageUri": "lib/",
"languageVersion": "2.12"
},
{ {
"name": "file", "name": "file",
"rootUri": "file:///C:/Users/Luca/Documents/flutter/flutter_windows_1.22.5-stable/flutter/.pub-cache/hosted/pub.dartlang.org/file-6.0.0", "rootUri": "file:///C:/Users/Luca/Documents/flutter/flutter_windows_1.22.5-stable/flutter/.pub-cache/hosted/pub.dartlang.org/file-6.0.0",
...@@ -109,6 +115,12 @@ ...@@ -109,6 +115,12 @@
"packageUri": "lib/", "packageUri": "lib/",
"languageVersion": "2.12" "languageVersion": "2.12"
}, },
{
"name": "flutter_spinkit",
"rootUri": "file:///C:/Users/Luca/Documents/flutter/flutter_windows_1.22.5-stable/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_spinkit-5.0.0",
"packageUri": "lib/",
"languageVersion": "2.12"
},
{ {
"name": "flutter_test", "name": "flutter_test",
"rootUri": "file:///C:/Users/Luca/Documents/flutter/flutter_windows_1.22.5-stable/flutter/packages/flutter_test", "rootUri": "file:///C:/Users/Luca/Documents/flutter/flutter_windows_1.22.5-stable/flutter/packages/flutter_test",
...@@ -123,7 +135,7 @@ ...@@ -123,7 +135,7 @@
}, },
{ {
"name": "graphview", "name": "graphview",
"rootUri": "file:///C:/Users/Luca/Documents/flutter/flutter_windows_1.22.5-stable/flutter/.pub-cache/hosted/pub.dartlang.org/graphview-0.6.6", "rootUri": "file:///C:/Users/Luca/Documents/flutter/flutter_windows_1.22.5-stable/flutter/.pub-cache/hosted/pub.dartlang.org/graphview-0.6.7",
"packageUri": "lib/", "packageUri": "lib/",
"languageVersion": "2.7" "languageVersion": "2.7"
}, },
...@@ -145,6 +157,12 @@ ...@@ -145,6 +157,12 @@
"packageUri": "lib/", "packageUri": "lib/",
"languageVersion": "2.10" "languageVersion": "2.10"
}, },
{
"name": "localstorage",
"rootUri": "file:///C:/Users/Luca/Documents/flutter/flutter_windows_1.22.5-stable/flutter/.pub-cache/hosted/pub.dartlang.org/localstorage-3.0.6+9",
"packageUri": "lib/",
"languageVersion": "2.2"
},
{ {
"name": "logger", "name": "logger",
"rootUri": "file:///C:/Users/Luca/Documents/flutter/flutter_windows_1.22.5-stable/flutter/.pub-cache/hosted/pub.dartlang.org/logger-0.9.4", "rootUri": "file:///C:/Users/Luca/Documents/flutter/flutter_windows_1.22.5-stable/flutter/.pub-cache/hosted/pub.dartlang.org/logger-0.9.4",
...@@ -169,9 +187,39 @@ ...@@ -169,9 +187,39 @@
"packageUri": "lib/", "packageUri": "lib/",
"languageVersion": "2.12" "languageVersion": "2.12"
}, },
{
"name": "path_provider",
"rootUri": "file:///C:/Users/Luca/Documents/flutter/flutter_windows_1.22.5-stable/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.27",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "path_provider_linux",
"rootUri": "file:///C:/Users/Luca/Documents/flutter/flutter_windows_1.22.5-stable/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-0.0.1+2",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "path_provider_macos",
"rootUri": "file:///C:/Users/Luca/Documents/flutter/flutter_windows_1.22.5-stable/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-0.0.4+8",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "path_provider_platform_interface",
"rootUri": "file:///C:/Users/Luca/Documents/flutter/flutter_windows_1.22.5-stable/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_platform_interface-1.0.4",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "path_provider_windows",
"rootUri": "file:///C:/Users/Luca/Documents/flutter/flutter_windows_1.22.5-stable/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_windows-0.0.5",
"packageUri": "lib/",
"languageVersion": "2.11"
},
{ {
"name": "pedantic", "name": "pedantic",
"rootUri": "file:///C:/Users/Luca/Documents/flutter/flutter_windows_1.22.5-stable/flutter/.pub-cache/hosted/pub.dartlang.org/pedantic-1.10.0", "rootUri": "file:///C:/Users/Luca/Documents/flutter/flutter_windows_1.22.5-stable/flutter/.pub-cache/hosted/pub.dartlang.org/pedantic-1.11.0",
"packageUri": "lib/", "packageUri": "lib/",
"languageVersion": "2.12" "languageVersion": "2.12"
}, },
...@@ -181,6 +229,12 @@ ...@@ -181,6 +229,12 @@
"packageUri": "lib/", "packageUri": "lib/",
"languageVersion": "2.12" "languageVersion": "2.12"
}, },
{
"name": "plugin_platform_interface",
"rootUri": "file:///C:/Users/Luca/Documents/flutter/flutter_windows_1.22.5-stable/flutter/.pub-cache/hosted/pub.dartlang.org/plugin_platform_interface-1.0.3",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{ {
"name": "process", "name": "process",
"rootUri": "file:///C:/Users/Luca/Documents/flutter/flutter_windows_1.22.5-stable/flutter/.pub-cache/hosted/pub.dartlang.org/process-4.0.0", "rootUri": "file:///C:/Users/Luca/Documents/flutter/flutter_windows_1.22.5-stable/flutter/.pub-cache/hosted/pub.dartlang.org/process-4.0.0",
...@@ -265,6 +319,18 @@ ...@@ -265,6 +319,18 @@
"packageUri": "lib/", "packageUri": "lib/",
"languageVersion": "2.0" "languageVersion": "2.0"
}, },
{
"name": "win32",
"rootUri": "file:///C:/Users/Luca/Documents/flutter/flutter_windows_1.22.5-stable/flutter/.pub-cache/hosted/pub.dartlang.org/win32-2.0.0",
"packageUri": "lib/",
"languageVersion": "2.12"
},
{
"name": "xdg_directories",
"rootUri": "file:///C:/Users/Luca/Documents/flutter/flutter_windows_1.22.5-stable/flutter/.pub-cache/hosted/pub.dartlang.org/xdg_directories-0.1.2",
"packageUri": "lib/",
"languageVersion": "2.3"
},
{ {
"name": "dashboard", "name": "dashboard",
"rootUri": "../", "rootUri": "../",
...@@ -272,7 +338,7 @@ ...@@ -272,7 +338,7 @@
"languageVersion": "2.7" "languageVersion": "2.7"
} }
], ],
"generated": "2021-03-10T14:27:38.710395Z", "generated": "2021-03-11T11:54:36.474922Z",
"generator": "pub", "generator": "pub",
"generatorVersion": "2.12.0" "generatorVersion": "2.12.0"
} }
# This is a generated file; do not edit or check into version control. # This is a generated file; do not edit or check into version control.
integration_test=C:\\_libs\\flutter\\packages\\integration_test\\ integration_test=C:\\Users\\Luca\\Documents\\flutter\\flutter_windows_1.22.5-stable\\flutter\\packages\\integration_test\\
path_provider=C:\\_libs\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\path_provider-1.6.27\\ path_provider=C:\\Users\\Luca\\Documents\\flutter\\flutter_windows_1.22.5-stable\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\path_provider-1.6.27\\
path_provider_linux=C:\\_libs\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\path_provider_linux-0.0.1+2\\ path_provider_linux=C:\\Users\\Luca\\Documents\\flutter\\flutter_windows_1.22.5-stable\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\path_provider_linux-0.0.1+2\\
path_provider_macos=C:\\_libs\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\path_provider_macos-0.0.4+8\\ path_provider_macos=C:\\Users\\Luca\\Documents\\flutter\\flutter_windows_1.22.5-stable\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\path_provider_macos-0.0.4+8\\
path_provider_windows=C:\\_libs\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\path_provider_windows-0.0.5\\ path_provider_windows=C:\\Users\\Luca\\Documents\\flutter\\flutter_windows_1.22.5-stable\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\path_provider_windows-0.0.5\\
<<<<<<< Updated upstream {"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"integration_test","path":"C:\\\\Users\\\\Luca\\\\Documents\\\\flutter\\\\flutter_windows_1.22.5-stable\\\\flutter\\\\packages\\\\integration_test\\\\","dependencies":[]},{"name":"path_provider","path":"C:\\\\Users\\\\Luca\\\\Documents\\\\flutter\\\\flutter_windows_1.22.5-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-1.6.27\\\\","dependencies":[]}],"android":[{"name":"integration_test","path":"C:\\\\Users\\\\Luca\\\\Documents\\\\flutter\\\\flutter_windows_1.22.5-stable\\\\flutter\\\\packages\\\\integration_test\\\\","dependencies":[]},{"name":"path_provider","path":"C:\\\\Users\\\\Luca\\\\Documents\\\\flutter\\\\flutter_windows_1.22.5-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-1.6.27\\\\","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"C:\\\\Users\\\\Luca\\\\Documents\\\\flutter\\\\flutter_windows_1.22.5-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_macos-0.0.4+8\\\\","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"C:\\\\Users\\\\Luca\\\\Documents\\\\flutter\\\\flutter_windows_1.22.5-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_linux-0.0.1+2\\\\","dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"C:\\\\Users\\\\Luca\\\\Documents\\\\flutter\\\\flutter_windows_1.22.5-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_windows-0.0.5\\\\","dependencies":[]}],"web":[]},"dependencyGraph":[{"name":"integration_test","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_macos","path_provider_linux","path_provider_windows"]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"path_provider_windows","dependencies":[]}],"date_created":"2021-03-11 13:07:08.355404","version":"2.0.1"}
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"integration_test","path":"C:\\\\Libs\\\\flutter\\\\packages\\\\integration_test\\\\","dependencies":[]}],"android":[{"name":"integration_test","path":"C:\\\\Libs\\\\flutter\\\\packages\\\\integration_test\\\\","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"integration_test","dependencies":[]}],"date_created":"2021-03-09 22:08:04.726748","version":"2.0.1"} \ No newline at end of file
=======
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"integration_test","path":"C:\\\\Users\\\\Luca\\\\Documents\\\\flutter\\\\flutter_windows_1.22.5-stable\\\\flutter\\\\packages\\\\integration_test\\\\","dependencies":[]}],"android":[{"name":"integration_test","path":"C:\\\\Users\\\\Luca\\\\Documents\\\\flutter\\\\flutter_windows_1.22.5-stable\\\\flutter\\\\packages\\\\integration_test\\\\","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"integration_test","dependencies":[]}],"date_created":"2021-03-10 16:07:42.326854","version":"2.0.1"}
>>>>>>> Stashed changes
This diff is collapsed.
sdk.dir=C:\\Users\\Manuel\\AppData\\Local\\Android\\sdk sdk.dir=C:\\Users\\Luca\\AppData\\Local\\Android\\sdk
flutter.sdk=C:\\_libs\\flutter flutter.sdk=C:\\Users\\Luca\\Documents\\flutter\\flutter_windows_1.22.5-stable\\flutter
\ No newline at end of file \ No newline at end of file
import 'package:apex_flutter_sdk/apex_flutter_sdk.dart'; import 'package:apex_flutter_sdk/apex_flutter_sdk.dart';
import 'package:dashboard/main.dart'; import 'package:dashboard/main.dart';
import 'package:dashboard/graphing/usergraph.dart'; import 'package:dashboard/graphing/usergraph.dart';
import 'package:dashboard/ui/util/logged_in_appbar.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../data/post.dart'; import '../data/post.dart';
import 'trustcolorcalculator.dart'; import 'trustcolorcalculator.dart';
...@@ -38,35 +39,32 @@ class PostNode extends StatelessWidget { ...@@ -38,35 +39,32 @@ class PostNode extends StatelessWidget {
} }
void redirectToPost(BuildContext context) { void redirectToPost(BuildContext context) {
Navigator.push( showDialog(
context, context: context, builder: (_) => new PostNodeDialog(post, trustColor));
MaterialPageRoute( //Navigator.push(
builder: (context) => PostNodeTooltip(post, this.trustColor), // context,
)); // MaterialPageRoute(
// builder: (context) => PostNodeTooltip(post, this.trustColor),
// ));
} }
} }
class PostNodeTooltip extends StatelessWidget { class PostNodeDialog extends StatelessWidget {
PostNodeTooltip(this.post, this.trustColor); PostNodeDialog(this.post, this.trustColor);
final Post post; final Post post;
final Color trustColor; final Color trustColor;
final double titleSize = 22; final double titleSize = 22;
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return AlertDialog(
body: Container( titlePadding: EdgeInsets.all(0),
padding: EdgeInsets.fromLTRB(12, 8, 12, 8), title: Container(
constraints: BoxConstraints.expand(),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4), color: Colors.blue,
boxShadow: [ boxShadow: [BoxShadow(blurRadius: 0.2, spreadRadius: 0.2)]),
BoxShadow(color: Colors.grey[100] ?? Colors.grey, spreadRadius: 1) padding: EdgeInsets.all(5),
], child: Row(
),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Row( Row(
...@@ -85,7 +83,9 @@ class PostNodeTooltip extends StatelessWidget { ...@@ -85,7 +83,9 @@ class PostNodeTooltip extends StatelessWidget {
), ),
], ],
), ),
Row( Container(
margin: EdgeInsets.fromLTRB(10, 0, 5, 0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Padding( Padding(
...@@ -95,7 +95,6 @@ class PostNodeTooltip extends StatelessWidget { ...@@ -95,7 +95,6 @@ class PostNodeTooltip extends StatelessWidget {
child: Text( child: Text(
post.author, post.author,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.black, color: Colors.black,
fontSize: titleSize, fontSize: titleSize,
), ),
...@@ -109,7 +108,6 @@ class PostNodeTooltip extends StatelessWidget { ...@@ -109,7 +108,6 @@ class PostNodeTooltip extends StatelessWidget {
child: Text( child: Text(
post.community, post.community,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.black, color: Colors.black,
fontSize: titleSize, fontSize: titleSize,
), ),
...@@ -121,7 +119,6 @@ class PostNodeTooltip extends StatelessWidget { ...@@ -121,7 +119,6 @@ class PostNodeTooltip extends StatelessWidget {
child: Text( child: Text(
(post.trust * 100).toString() + "%", (post.trust * 100).toString() + "%",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold,
color: trustColor, color: trustColor,
fontSize: titleSize, fontSize: titleSize,
), ),
...@@ -130,28 +127,54 @@ class PostNodeTooltip extends StatelessWidget { ...@@ -130,28 +127,54 @@ class PostNodeTooltip extends StatelessWidget {
Padding( Padding(
padding: const EdgeInsets.fromLTRB(25, 0, 0, 0), padding: const EdgeInsets.fromLTRB(25, 0, 0, 0),
child: Material( child: Material(
color: Colors.red[400] ?? Colors.red, color: Colors.blue,
child: IconButton( child: IconButton(
onPressed: () => Navigator.pop(context), onPressed: () => Navigator.pop(context),
icon: Icon(Icons.close), icon: Icon(
Icons.close,
color: Colors.white,
),
), ),
), ),
), ),
], ],
),
) )
], ],
), ),
Container( ),
content: Column(
children: [
Column(
children: [
SingleChildScrollView(
child: Container(
//constraints: BoxConstraints.expand(), //constraints: BoxConstraints.expand(),
padding: EdgeInsets.fromLTRB(0, 10, 0, 0), padding: EdgeInsets.fromLTRB(0, 10, 0, 0),
child: Text( child: Text(
post.content, post.content != ""
? post.content
: "There is nothing here :(",
overflow: TextOverflow.fade, overflow: TextOverflow.fade,
style: TextStyle(color: Colors.black, fontSize: 15), style: TextStyle(color: Colors.black, fontSize: 19),
),
),
),
],
), ),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Text(
post.title != "" ? post.comments.toString() + " Comments" : "",
textAlign: TextAlign.right,
style: TextStyle(fontSize: 16),
), ),
], ],
)), )
],
mainAxisAlignment: MainAxisAlignment.spaceBetween,
),
); );
} }
......
...@@ -93,8 +93,9 @@ class DataGetter { ...@@ -93,8 +93,9 @@ class DataGetter {
for (Map<String, dynamic> postMap in postMapList) { for (Map<String, dynamic> postMap in postMapList) {
Post post = Post( Post post = Post(
postMap[
"content"], // i think title and content got mixed up in the backend
postMap["title"], postMap["title"],
postMap["content"],
postMap["user_id"], postMap["user_id"],
postMap["subreddit"], postMap["subreddit"],
postMap["percentage_upvoted"], postMap["percentage_upvoted"],
......
import 'package:dashboard/sign_in/login_form.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:logger/logger.dart';
class LoginPage extends StatefulWidget {
LoginPage();
@override
_LoginPageState createState() => _LoginPageState();
}
class _LoginPageState extends State<LoginPage> {
String _error;
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: LoginForm(tryLogin, _error),
),
);
}
void tryLogin(String username, String password) async {
await Future.delayed(Duration(seconds: 1));
String json = "{\"username\":\"$username\",\"password\":\"$password\"}";
Future<Map<String, dynamic>> tokenJson = DataGetter.postJson(
"https://articonf1.itec.aau.at:30401/api/tokens", json);
tokenJson.then((value) => Logger().i(value.toString()));
setState(() {
_error = "Test fehlermeldung :)";
});
// tokenJson.then((value) {
// print("bruh");
// Credentials().token = value["token"] as String;
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) => CommunityMetaGraphViewPage()));
// }).catchError(
// () {
// print("omegabruh");
// setState(
// () => error = "Wrong Credentials :(",
// );
// },
// );
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment