我是新手,无法从底部导航栏导航到新页面
我有主应用
Sub DeleteRecord()
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 9
ActiveWindow.ScrollColumn = 11
ActiveWindow.ScrollColumn = 16
ActiveWindow.ScrollColumn = 20
ActiveWindow.ScrollColumn = 22
ActiveWindow.ScrollColumn = 23
ActiveWindow.ScrollColumn = 24
ActiveWindow.ScrollColumn = 25
ActiveWindow.ScrollColumn = 27
ActiveWindow.ScrollColumn = 29
ActiveWindow.ScrollColumn = 30
ActiveWindow.ScrollColumn = 31
ActiveWindow.ScrollColumn = 32
Dim MySheet As String
MySheet = ActiveSheet.Name
ActiveSheet.Cells(1, 1).CurrentRegion.AutoFilter Field:=33, Criteria1:= _
">=-.09", Operator:=xlAnd, Criteria2:="<=.01"
Dim cnt As Long
cnt = Worksheets(MySheet).Cells.SpecialCells(xlCellTypeLastCell).Row
ActiveSheet.Range("A2", ActiveCell.SpecialCells(xlLastCell)).Select
If cnt > 3 Then
Selection.EntireRow.Delete
End If
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 11
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 16
ActiveWindow.ScrollColumn = 20
ActiveWindow.ScrollColumn = 23
ActiveWindow.ScrollColumn = 28
ActiveWindow.ScrollColumn = 30
ActiveSheet.Cells(1, 1).CurrentRegion.AutoFilter Field:=33
' Range("Claims[[#Headers],[Change in Calculated Contribution]]").Select
Cells(1, 33).Select
Selection.AutoFilter
End Sub
和Rootnavigator
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
statusBarColor: Colors.transparent,
));
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(primarySwatch: Colors.blue),
builder: (BuildContext buildContext, Widget widtget) => Scaffold(
body: RootNavigator(),
bottomNavigationBar: BottomNavigation(),
),
);
}
}
和底部导航器
class RootNavigator extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Navigator(
initialRoute: '/',
onGenerateRoute: (RouteSettings settings) {
// final args = settings.arguments;
return MaterialPageRoute(
settings: settings,
builder: (BuildContext context) {
switch (settings.name) {
case '/':
return Page1();
case '/page2':
return Page2();
case '/page3':
return Page3();
default:
return RouteErrorPage();
}
});
},
);
}
}
标签正在切换,但路由未切换。它停留在主页上。 我感觉有一些与上下文有关的东西,但不知道如何解决。 有人可以帮忙吗? 谢谢
p.s。如果我将底部导航栏分别移动到每个页面,除了选中的选项卡(由于状态)之外,其他所有功能都可以正常工作,而且我还想保留一个共享的应用程序栏
答案 0 :(得分:0)
答案是-@爱评论是正确的。 那就是颤动的原理。 如果您具有底部导航,则必须在页面之间滑动。 重定向意味着移动到全新的页面,然后您必须在sratch中定义Scaffold。 如果您想共享AppBar-使其成为可重用的小部件