Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
ea361866
Commit
ea361866
authored
Feb 15, 2016
by
Adam Barth
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1880 from abarth/create_company
Stocks input field for company name doesn't work
parents
efa47a6f
b672a3d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
11 deletions
+29
-11
stock_home.dart
examples/stocks/lib/stock_home.dart
+29
-11
No files found.
examples/stocks/lib/stock_home.dart
View file @
ea361866
...
...
@@ -262,18 +262,8 @@ class StockHomeState extends State<StockHome> {
void
_handleCreateCompany
()
{
showModalBottomSheet
(
// TODO(ianh): Fill this out.
context:
context
,
builder:
(
BuildContext
context
)
{
return
new
Column
(
children:
<
Widget
>[
new
Input
(
autofocus:
true
,
hintText:
'Company Name'
),
]
);
}
builder:
(
BuildContext
context
)
=>
new
_CreateCompanySheet
()
);
}
...
...
@@ -303,3 +293,31 @@ class StockHomeState extends State<StockHome> {
);
}
}
class
_CreateCompanySheet
extends
StatefulComponent
{
_CreateCompanySheetState
createState
()
=>
new
_CreateCompanySheetState
();
}
class
_CreateCompanySheetState
extends
State
<
_CreateCompanySheet
>
{
InputValue
_companyName
=
InputValue
.
empty
;
void
_handleCompanyNameChanged
(
InputValue
value
)
{
setState
(()
{
_companyName
=
value
;
});
}
Widget
build
(
BuildContext
context
)
{
// TODO(ianh): Fill this out.
return
new
Column
(
children:
<
Widget
>[
new
Input
(
autofocus:
true
,
hintText:
'Company Name'
,
value:
_companyName
,
onChanged:
_handleCompanyNameChanged
),
]
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment