-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
initial UI for mobile #3
Merged
Merged
Changes from 6 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
593e8b6
initial UI for mobile
76b6cd1
fix code format
99d89fc
skip test
13df146
fix tabcontroller issues
f6cb3da
fix tabcontroller warning
d5fc1c4
fix assigning values to key and values warning
7185b8c
change if else condition to switch
60d4670
fix msgpack text and hide send button
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import "package:flutter/material.dart"; | ||
|
||
class ArgsProvider extends ChangeNotifier { | ||
List<TextEditingController> controllers = [TextEditingController()]; | ||
|
||
void addController() { | ||
controllers.add(TextEditingController()); | ||
notifyListeners(); | ||
} | ||
|
||
void removeController(int index) { | ||
controllers.removeAt(index); | ||
notifyListeners(); | ||
} | ||
|
||
@override | ||
void dispose() { | ||
for (final controller in controllers) { | ||
controller.dispose(); | ||
} | ||
super.dispose(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import "package:flutter/cupertino.dart"; | ||
|
||
class TableDataProvider extends ChangeNotifier { | ||
final List<Map<String, String>> _tableData = [ | ||
{"key": "", "value": ""}, | ||
]; | ||
|
||
List<Map<String, String>> get tableData => _tableData; | ||
|
||
void addRow(Map<String, String> rowData) { | ||
_tableData.add(rowData); | ||
notifyListeners(); | ||
} | ||
|
||
void removeRow(int index) { | ||
_tableData.removeAt(index); | ||
notifyListeners(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import "package:flutter/material.dart"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. file name should be |
||
|
||
/// Colors /// | ||
Color homeAppBarBackgroundColor = Colors.white; | ||
Color homeAppBarTextColor = Colors.black; | ||
Color blackColor = Colors.black; | ||
Color dropDownTextColor = Colors.green; | ||
Color blueAccentColor = Colors.blueAccent; | ||
Color whiteColor = Colors.white; | ||
Color closeIconColor = Colors.redAccent; | ||
|
||
/// Icon Size /// | ||
const double iconSize = 15; | ||
const double largeIconSize = 20; | ||
const double horizontalPadding = 10; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import "package:flutter/material.dart"; | ||
|
||
class ResponsiveLayout extends StatelessWidget { | ||
const ResponsiveLayout({ | ||
required this.mobileScaffold, | ||
required this.tabletScaffold, | ||
required this.desktopScaffold, | ||
super.key, | ||
}); | ||
final Widget mobileScaffold; | ||
final Widget tabletScaffold; | ||
final Widget desktopScaffold; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return LayoutBuilder( | ||
builder: (context, constraints) { | ||
if (constraints.maxWidth < 500) { | ||
return mobileScaffold; | ||
} else if (constraints.maxWidth < 1100) { | ||
return tabletScaffold; | ||
} else { | ||
return desktopScaffold; | ||
Comment on lines
+18
to
+23
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there any other better way to do this? This seems kind of hackish. |
||
} | ||
}, | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import "package:flutter/material.dart"; | ||
|
||
class DesktopHomeScaffold extends StatelessWidget { | ||
const DesktopHomeScaffold({super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return const Scaffold( | ||
backgroundColor: Colors.greenAccent, | ||
); | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.