Skip to content

Commit

Permalink
wamp actions implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaki Sun committed May 24, 2024
1 parent 9060e69 commit 600ebd4
Show file tree
Hide file tree
Showing 10 changed files with 427 additions and 225 deletions.
6 changes: 4 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import "package:flutter/material.dart";
import "package:provider/provider.dart";
import "package:xconn_ui/Providers/args_provider.dart";
import "package:xconn_ui/Providers/kwargs_provider.dart";
import "package:xconn_ui/providers/args_provider.dart";
import "package:xconn_ui/providers/invocation_provider.dart";
import "package:xconn_ui/providers/kwargs_provider.dart";
import "package:xconn_ui/responsive/responsive_layout.dart";
import "package:xconn_ui/screens/mobile/mobile_home.dart";

Expand All @@ -18,6 +19,7 @@ class MyApp extends StatelessWidget {
providers: [
ChangeNotifierProvider(create: (context) => ArgsProvider()),
ChangeNotifierProvider(create: (context) => KwargsProvider()),
ChangeNotifierProvider(create: (context) => InvocationProvider()),
],
child: MaterialApp(
debugShowCheckedModeBanner: false,
Expand Down
File renamed without changes.
14 changes: 14 additions & 0 deletions lib/providers/invocation_provider.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import "package:flutter/cupertino.dart";

class InvocationProvider extends ChangeNotifier {
final List<String> _results = [];

List<String> get results => _results;

void addResult(String result, int index) {
if (!_results.contains(result)) {
_results.add(result);
notifyListeners();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,16 @@ class KwargsProvider extends ChangeNotifier {
List<Map<String, dynamic>> get tableData => _tableData;

void addRow(Map<String, String> rowData) {
// print("Hello");
_tableData.add(rowData);
// print("length ${_tableData.length}");
notifyListeners();
}

void removeRow(int index) {
// print("Kassssss");
_tableData.removeAt(index);
// print("lenggggggg ${_tableData.length}");
notifyListeners();
}
}
Loading

0 comments on commit 600ebd4

Please sign in to comment.