我有一个笔记本名称为“ paths”,我想在另一个笔记本中使用其中声明的val,但出现错误。我正在使用Spark-scala
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'TEST',
home: DefaultTabController(
length: 2,
child: HomePage(),
),
);
}
}
class HomePage extends StatefulWidget {
_HomePageState createState() => _HomePageState();
}
class _HomePageState extends State<HomePage> {
List<Map<int, String>> list;
@override
void initState() {
list = List();
super.initState();
}
void _addList(Map<int, String> item){
setState(() {
list.add(item);
});
}
void _removeList(int index){
setState(() {
list.removeAt(index);
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('TEST'),
bottom: TabBar(
tabs: <Widget>[
Tab(icon: Icon(Icons.home),),
Tab(icon: Icon(Icons.inbox),)
],
),
),
body: TabBarView(
children: <Widget>[
DisplayPage(listItem: list, removeList: _removeList),
InputPage(addList: _addList),
],
),
);
}
}
class DisplayPage extends StatelessWidget {
final Function removeList;
final List<Map> listItem;
DisplayPage({this.listItem, this.removeList});
@override
Widget build(BuildContext context) {
return ListView.builder(
itemCount: listItem.length,
itemBuilder: (BuildContext context, int index){
return ListTile(
// onTap: (){removeList(index);}, i can delete it in this class because it has the index
title: Text(listItem[index][1]),
subtitle: Text(listItem[index][2]),
);
},
);
}
}
class InputPage extends StatelessWidget {
final Function addList, removeList;
InputPage({this.addList, this.removeList});
@override
Widget build(BuildContext context) {
return Center(
child: Container(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
RaisedButton(child: Text('ADD'), onPressed: () {addList({ 1 : 'Hello', 2 : 'World'});}),
// RaisedButton(child: Text('DELETE'), onPressed: () {removeList();}), how to delete it from here??
],
)
),
);
}
}
错误
// Find employee
$this->context->employee = new Employee();
$this->context->employee->getByEmail($email, $passwd);
$this->context->employee->logout();
答案 0 :(得分:0)
请使用%run / Users / testuser / TESTParam
您还可以传递其他参数,例如
%run / Users / testuser / TESTParam $ runtype =“ Sequential” $ configuration =“ xxx” $ runnumber = 1-10